Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / InlinedLocationReference.cs / 1305376 / InlinedLocationReference.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities { using System; class InlinedLocationReference : LocationReference { LocationReference innerReference; Activity validAccessor; public InlinedLocationReference(LocationReference innerReference, Activity validAccessor) { this.innerReference = innerReference; this.validAccessor = validAccessor; } protected override string NameCore { get { return this.innerReference.Name; } } protected override Type TypeCore { get { return this.innerReference.Type; } } public override Location GetLocation(ActivityContext context) { if (context == null) { throw FxTrace.Exception.ArgumentNull("context"); } // We need to call ThrowIfDisposed explicitly since // context.Activity does not check isDisposed context.ThrowIfDisposed(); if (!object.ReferenceEquals(context.Activity, this.validAccessor)) { throw FxTrace.Exception.AsError(new InvalidOperationException(SR.InlinedLocationReferenceOnlyAccessibleByOwner(context.Activity, this.validAccessor))); } try { context.AllowChainedEnvironmentAccess = true; return this.innerReference.GetLocation(context); } finally { context.AllowChainedEnvironmentAccess = false; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Pkcs9Attribute.cs
- ExpressionList.cs
- AssociatedControlConverter.cs
- ProviderConnectionPoint.cs
- SchemaElementDecl.cs
- TypeDescriptionProvider.cs
- NetworkAddressChange.cs
- AnnotationHighlightLayer.cs
- AnimationException.cs
- CryptoConfig.cs
- XmlSchemaInfo.cs
- MetaModel.cs
- KoreanLunisolarCalendar.cs
- WindowInteropHelper.cs
- PointAnimationBase.cs
- OrderingInfo.cs
- X509SubjectKeyIdentifierClause.cs
- PointLight.cs
- XmlReader.cs
- Pts.cs
- CodeTypeDeclarationCollection.cs
- XmlSiteMapProvider.cs
- DataGridViewCheckBoxCell.cs
- ViewKeyConstraint.cs
- CustomWebEventKey.cs
- RangeBase.cs
- WebMessageEncoderFactory.cs
- MultiPartWriter.cs
- RoutingChannelExtension.cs
- ExpressionStringBuilder.cs
- Polyline.cs
- XmlBindingWorker.cs
- XmlCountingReader.cs
- _AutoWebProxyScriptHelper.cs
- AccessibleObject.cs
- FormsAuthentication.cs
- DataGridTableCollection.cs
- BaseValidator.cs
- CheckoutException.cs
- AndCondition.cs
- ObjRef.cs
- SpellerInterop.cs
- SamlConstants.cs
- Animatable.cs
- SafeSecurityHandles.cs
- RotateTransform3D.cs
- XmlBoundElement.cs
- MarkupCompilePass1.cs
- OverflowException.cs
- EditorPart.cs
- Renderer.cs
- dbenumerator.cs
- StringSorter.cs
- MemberAccessException.cs
- SqlWebEventProvider.cs
- ReadOnlyTernaryTree.cs
- DataComponentGenerator.cs
- CryptographicAttribute.cs
- LinqDataSourceStatusEventArgs.cs
- EntityDataSourceEntitySetNameItem.cs
- ErrorWebPart.cs
- SelectionEditingBehavior.cs
- ExpressionPrefixAttribute.cs
- ParenExpr.cs
- BookmarkScopeManager.cs
- DPTypeDescriptorContext.cs
- PipelineModuleStepContainer.cs
- HtmlWindow.cs
- ToolStripDropDownItem.cs
- TransformerConfigurationWizardBase.cs
- Cursor.cs
- ComponentSerializationService.cs
- LinkedResource.cs
- ApplicationException.cs
- FontDialog.cs
- PhonemeEventArgs.cs
- SqlDataSourceView.cs
- GridViewColumnCollectionChangedEventArgs.cs
- BufferModesCollection.cs
- CodeSnippetCompileUnit.cs
- OracleRowUpdatedEventArgs.cs
- ParserHooks.cs
- UnsafeNetInfoNativeMethods.cs
- XmlDigitalSignatureProcessor.cs
- MaterialGroup.cs
- PreviewKeyDownEventArgs.cs
- BeginStoryboard.cs
- FileEnumerator.cs
- XmlSchemaSimpleType.cs
- LinqDataSourceContextData.cs
- ValidationErrorCollection.cs
- XmlNodeChangedEventArgs.cs
- TaskScheduler.cs
- EventBuilder.cs
- Convert.cs
- RelationshipNavigation.cs
- MenuAdapter.cs
- baseaxisquery.cs
- CompilationUtil.cs
- IDispatchConstantAttribute.cs