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
- BuiltInExpr.cs
- CommentAction.cs
- Serializer.cs
- MessageQueueEnumerator.cs
- InternalConfigHost.cs
- Double.cs
- _NativeSSPI.cs
- ListBox.cs
- JsonUriDataContract.cs
- HScrollProperties.cs
- BamlResourceSerializer.cs
- XmlUtf8RawTextWriter.cs
- Profiler.cs
- ContainerControl.cs
- SparseMemoryStream.cs
- KeyProperty.cs
- PersistenceTypeAttribute.cs
- ThreadExceptionDialog.cs
- SizeConverter.cs
- SystemIPGlobalStatistics.cs
- TemplatePartAttribute.cs
- NamespaceEmitter.cs
- XmlElement.cs
- HexParser.cs
- WebPartTransformer.cs
- Rights.cs
- ListViewUpdateEventArgs.cs
- DataRecordInternal.cs
- ProviderCommandInfoUtils.cs
- UdpTransportSettings.cs
- SqlCommandSet.cs
- SchemaConstraints.cs
- CodeDirectionExpression.cs
- WorkflowLayouts.cs
- EventLogPermissionEntry.cs
- DependencySource.cs
- BaseProcessor.cs
- ColorTranslator.cs
- RelationshipNavigation.cs
- Column.cs
- SymmetricCryptoHandle.cs
- relpropertyhelper.cs
- MasterPageCodeDomTreeGenerator.cs
- NavigatingCancelEventArgs.cs
- FrameDimension.cs
- _DisconnectOverlappedAsyncResult.cs
- WebBrowserPermission.cs
- PageContentAsyncResult.cs
- OpenTypeCommon.cs
- TypeSystem.cs
- TextBox.cs
- PrimitiveSchema.cs
- TreeNode.cs
- PackagePart.cs
- List.cs
- HGlobalSafeHandle.cs
- LogoValidationException.cs
- DetailsView.cs
- Validator.cs
- Renderer.cs
- ColumnPropertiesGroup.cs
- DbBuffer.cs
- ResourceWriter.cs
- NamedPipeHostedTransportConfiguration.cs
- CanonicalFontFamilyReference.cs
- SemanticAnalyzer.cs
- ImageDrawing.cs
- TemplateContainer.cs
- SelectorItemAutomationPeer.cs
- WebBrowsableAttribute.cs
- RequestSecurityToken.cs
- Blend.cs
- VerificationAttribute.cs
- StringKeyFrameCollection.cs
- SqlErrorCollection.cs
- EventLogger.cs
- ObjectDataSourceDisposingEventArgs.cs
- MediaTimeline.cs
- LayoutEditorPart.cs
- Helpers.cs
- EntityCommandDefinition.cs
- DataGridTextBoxColumn.cs
- WindowVisualStateTracker.cs
- WebDescriptionAttribute.cs
- TextPointer.cs
- XDRSchema.cs
- DataGridLinkButton.cs
- _CookieModule.cs
- SpellerHighlightLayer.cs
- WarningException.cs
- WebPartVerbsEventArgs.cs
- AttributeAction.cs
- WebExceptionStatus.cs
- MembershipAdapter.cs
- ConfigurationProperty.cs
- TCPClient.cs
- GeneralTransform3D.cs
- MembershipUser.cs
- PointAnimationClockResource.cs
- XmlSchemaGroup.cs