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
- PartialCachingControl.cs
- SecurityElement.cs
- GridEntry.cs
- RichTextBoxConstants.cs
- ObjectQueryProvider.cs
- ResourceAssociationTypeEnd.cs
- StrongNameHelpers.cs
- LineBreak.cs
- DefaultTextStore.cs
- FeatureManager.cs
- NGCPageContentSerializerAsync.cs
- EntityClassGenerator.cs
- Regex.cs
- Perspective.cs
- TraceUtils.cs
- FragmentQueryProcessor.cs
- NamespaceEmitter.cs
- WebSysDescriptionAttribute.cs
- nulltextnavigator.cs
- GridEntry.cs
- SQLInt64Storage.cs
- HttpProfileBase.cs
- DataGridView.cs
- WindowsGraphicsWrapper.cs
- DataGridViewImageCell.cs
- WindowsStatic.cs
- CfgParser.cs
- Rotation3D.cs
- FixedHighlight.cs
- XmlHierarchyData.cs
- FreezableCollection.cs
- ByteStorage.cs
- InfocardChannelParameter.cs
- XPathScanner.cs
- clipboard.cs
- CommonDialog.cs
- tooltip.cs
- ClientConfigPaths.cs
- Globals.cs
- DataControlFieldHeaderCell.cs
- SevenBitStream.cs
- Imaging.cs
- DrawItemEvent.cs
- columnmapfactory.cs
- SerializableAttribute.cs
- ParameterCollection.cs
- ExpressionEditorAttribute.cs
- WindowVisualStateTracker.cs
- unsafenativemethodstextservices.cs
- ProgressBarBrushConverter.cs
- TcpWorkerProcess.cs
- DataGridViewCheckBoxCell.cs
- BaseDataList.cs
- PrintPageEvent.cs
- FontWeightConverter.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- SHA1.cs
- SchemaMapping.cs
- TrustManager.cs
- ServicesUtilities.cs
- ManipulationDeltaEventArgs.cs
- ImageButton.cs
- PropertyGeneratedEventArgs.cs
- WebConfigurationHostFileChange.cs
- FeatureAttribute.cs
- TerminateDesigner.cs
- FormsAuthenticationCredentials.cs
- log.cs
- XmlResolver.cs
- DrawingAttributeSerializer.cs
- ListViewInsertEventArgs.cs
- CustomTypeDescriptor.cs
- OdbcError.cs
- PartialTrustHelpers.cs
- DTCTransactionManager.cs
- EncodedStreamFactory.cs
- TablePatternIdentifiers.cs
- InsufficientMemoryException.cs
- Typeface.cs
- input.cs
- Menu.cs
- GeneralTransformCollection.cs
- XmlSerializerFactory.cs
- ListDataBindEventArgs.cs
- SmtpNtlmAuthenticationModule.cs
- StringComparer.cs
- RuleSettings.cs
- OdbcConnectionPoolProviderInfo.cs
- ExtensionFile.cs
- InteropAutomationProvider.cs
- AnnotationResourceCollection.cs
- Vector3DKeyFrameCollection.cs
- ThrowHelper.cs
- ResXResourceSet.cs
- ToolBarButton.cs
- PropertyStore.cs
- OracleFactory.cs
- CacheSection.cs
- RC2.cs
- FramingEncoders.cs