Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / BookmarkScopeHandle.cs / 1305376 / BookmarkScopeHandle.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities { using System; using System.Runtime; using System.Runtime.Serialization; [DataContract] public sealed class BookmarkScopeHandle : Handle { [DataMember(EmitDefaultValue = false)] BookmarkScope bookmarkScope; static BookmarkScopeHandle defaultBookmarkScopeHandle = new BookmarkScopeHandle(BookmarkScope.Default); public BookmarkScopeHandle() { } internal BookmarkScopeHandle(BookmarkScope bookmarkScope) { this.bookmarkScope = bookmarkScope; } public static BookmarkScopeHandle Default { get { return defaultBookmarkScopeHandle; } } public BookmarkScope BookmarkScope { get { return this.bookmarkScope; } } //To be called from public APIs that need to verify the passed in context void ThrowIfContextIsNullOrDisposed(NativeActivityContext context) { if (context == null) { throw FxTrace.Exception.ArgumentNull("context"); } context.ThrowIfDisposed(); } public void CreateBookmarkScope(NativeActivityContext context) { this.ThrowIfContextIsNullOrDisposed(context); if (this.bookmarkScope != null) { throw FxTrace.Exception.AsError(new InvalidOperationException(SR.CreateBookmarkScopeFailed)); } this.ThrowIfUninitialized(); this.bookmarkScope = context.CreateBookmarkScope(Guid.Empty, this); } public void CreateBookmarkScope(NativeActivityContext context, Guid scopeId) { this.ThrowIfContextIsNullOrDisposed(context); if (this.bookmarkScope != null) { throw FxTrace.Exception.AsError(new InvalidOperationException(SR.CreateBookmarkScopeFailed)); } this.ThrowIfUninitialized(); this.bookmarkScope = context.CreateBookmarkScope(scopeId, this); } public void Initialize(NativeActivityContext context, Guid scope) { this.ThrowIfContextIsNullOrDisposed(context); this.ThrowIfUninitialized(); this.bookmarkScope.Initialize(context, scope); } } } // 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
- AuthorizationRuleCollection.cs
- LinqToSqlWrapper.cs
- MouseEvent.cs
- ControlPropertyNameConverter.cs
- DocumentOrderComparer.cs
- DesignerCategoryAttribute.cs
- BaseTypeViewSchema.cs
- Deflater.cs
- WindowsFormsSynchronizationContext.cs
- BamlStream.cs
- ToolStripPanelRenderEventArgs.cs
- ValueExpressions.cs
- AddInServer.cs
- DBSchemaTable.cs
- CrossSiteScriptingValidation.cs
- PointKeyFrameCollection.cs
- ISessionStateStore.cs
- TiffBitmapDecoder.cs
- WindowsTokenRoleProvider.cs
- PeerResolverSettings.cs
- SizeConverter.cs
- pingexception.cs
- PrivilegeNotHeldException.cs
- ZipPackagePart.cs
- WebHttpSecurity.cs
- ContextMenuStrip.cs
- CodeSubDirectoriesCollection.cs
- DesignerSelectionListAdapter.cs
- QueryableDataSource.cs
- CellCreator.cs
- EndpointPerformanceCounters.cs
- GridViewAutomationPeer.cs
- SchemaDeclBase.cs
- ToolBarButton.cs
- DesignerTransactionCloseEvent.cs
- FontDialog.cs
- ProcessHostMapPath.cs
- AssemblyAttributesGoHere.cs
- Component.cs
- Size.cs
- XmlSchemaAttributeGroupRef.cs
- ObjectFullSpanRewriter.cs
- PtsPage.cs
- IncrementalHitTester.cs
- DesignTimeData.cs
- updatecommandorderer.cs
- CodeArrayIndexerExpression.cs
- AttributeData.cs
- AutomationPattern.cs
- InputGestureCollection.cs
- MailMessage.cs
- AttachedPropertyMethodSelector.cs
- MetafileHeader.cs
- DBConnectionString.cs
- ColorInterpolationModeValidation.cs
- Int32Converter.cs
- SystemIPInterfaceProperties.cs
- XmlExpressionDumper.cs
- VerificationException.cs
- Wizard.cs
- SqlDataSourceStatusEventArgs.cs
- WindowsGraphicsWrapper.cs
- Point3DKeyFrameCollection.cs
- ByteStack.cs
- EmptyCollection.cs
- TypeValidationEventArgs.cs
- FontCacheLogic.cs
- BinaryMethodMessage.cs
- TemplateKey.cs
- PropertyGridView.cs
- Endpoint.cs
- _DomainName.cs
- LookupNode.cs
- DoubleAnimationClockResource.cs
- SQLDouble.cs
- FormsAuthenticationUserCollection.cs
- MethodRental.cs
- BamlMapTable.cs
- WinEventWrap.cs
- Font.cs
- ServiceChannelManager.cs
- BaseParagraph.cs
- RectConverter.cs
- SettingsProperty.cs
- CriticalExceptions.cs
- SchemaRegistration.cs
- ProcessThreadCollection.cs
- PackagePart.cs
- PrintController.cs
- KeySpline.cs
- FramingDecoders.cs
- BitmapEffectInput.cs
- BuilderInfo.cs
- ZoneMembershipCondition.cs
- CodePageUtils.cs
- TokenCreationParameter.cs
- Expression.cs
- KernelTypeValidation.cs
- XmlChildEnumerator.cs
- XmlAtomicValue.cs