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
- PenThread.cs
- XmlSerializationWriter.cs
- Viewport3DVisual.cs
- PageFunction.cs
- XamlTreeBuilder.cs
- PeerObject.cs
- ProcessHostServerConfig.cs
- SqlAliaser.cs
- CodeDomLoader.cs
- RMEnrollmentPage2.cs
- ValidationRuleCollection.cs
- XmlWellformedWriter.cs
- ReflectEventDescriptor.cs
- HttpGetClientProtocol.cs
- ObjectListFieldsPage.cs
- TypeConverterHelper.cs
- WebPartVerbsEventArgs.cs
- PassportAuthentication.cs
- XmlWriter.cs
- PersonalizationStateQuery.cs
- InteropEnvironment.cs
- HandlerMappingMemo.cs
- RoleManagerSection.cs
- TextEditorDragDrop.cs
- ColorAnimation.cs
- EventListenerClientSide.cs
- regiisutil.cs
- MemoryFailPoint.cs
- Attributes.cs
- DesignerProperties.cs
- Crypto.cs
- MetadataItemEmitter.cs
- BitmapImage.cs
- ConfigXmlCDataSection.cs
- HttpValueCollection.cs
- SspiSecurityToken.cs
- ScrollChrome.cs
- HandlerFactoryCache.cs
- Metadata.cs
- TcpPortSharing.cs
- WebPartZone.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- NetworkInformationPermission.cs
- RegexEditorDialog.cs
- DataGridViewRowCancelEventArgs.cs
- ParsedAttributeCollection.cs
- ActivityExecutionContextCollection.cs
- BinaryFormatter.cs
- PropertyPathWorker.cs
- NativeMethods.cs
- DbSetClause.cs
- NavigationCommands.cs
- ReferentialConstraint.cs
- TagMapCollection.cs
- ObjectItemCollection.cs
- ImageSource.cs
- StateItem.cs
- RolePrincipal.cs
- PerCallInstanceContextProvider.cs
- ProviderConnectionPointCollection.cs
- GiveFeedbackEvent.cs
- ColumnClickEvent.cs
- SAPIEngineTypes.cs
- MethodBuilderInstantiation.cs
- EventRouteFactory.cs
- DataGridViewRowPrePaintEventArgs.cs
- Typography.cs
- TransformProviderWrapper.cs
- EmptyTextWriter.cs
- CoTaskMemUnicodeSafeHandle.cs
- SerialPinChanges.cs
- Token.cs
- DifferencingCollection.cs
- SqlDataSourceSelectingEventArgs.cs
- NavigationProperty.cs
- SqlTypesSchemaImporter.cs
- HighlightComponent.cs
- JavascriptXmlWriterWrapper.cs
- SessionPageStatePersister.cs
- EditorZoneDesigner.cs
- CodeDelegateCreateExpression.cs
- RuntimeResourceSet.cs
- InvokeMethod.cs
- _BaseOverlappedAsyncResult.cs
- CompilationLock.cs
- AttributeExtensions.cs
- ListViewGroupCollectionEditor.cs
- WSSecureConversationFeb2005.cs
- QueryBranchOp.cs
- TextServicesDisplayAttribute.cs
- SQLInt16.cs
- ISCIIEncoding.cs
- LinkedResourceCollection.cs
- DoubleLinkList.cs
- RealProxy.cs
- WebResourceAttribute.cs
- DayRenderEvent.cs
- Rectangle.cs
- XmlText.cs
- CalendarDay.cs