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
- CodeCompiler.cs
- FolderNameEditor.cs
- Hash.cs
- SynchronizationFilter.cs
- EditorPart.cs
- BaseDataList.cs
- documentsequencetextview.cs
- QueryTaskGroupState.cs
- StringFreezingAttribute.cs
- AndMessageFilter.cs
- DBConnectionString.cs
- ThousandthOfEmRealDoubles.cs
- FileDialogCustomPlace.cs
- BindingOperations.cs
- BitFlagsGenerator.cs
- PrintPageEvent.cs
- PointHitTestParameters.cs
- DocumentReferenceCollection.cs
- TextTreeExtractElementUndoUnit.cs
- CacheForPrimitiveTypes.cs
- SessionStateModule.cs
- SharedPersonalizationStateInfo.cs
- SecurityHeaderTokenResolver.cs
- CLSCompliantAttribute.cs
- XmlSchemaAnnotation.cs
- HttpPostLocalhostServerProtocol.cs
- NavigationCommands.cs
- RoutedEventConverter.cs
- HTMLTextWriter.cs
- ComponentDispatcherThread.cs
- XmlCodeExporter.cs
- EncryptionUtility.cs
- TableCell.cs
- CounterSetInstance.cs
- NetworkAddressChange.cs
- CalendarDateChangedEventArgs.cs
- MessageAction.cs
- TypedTableBaseExtensions.cs
- MetabaseSettings.cs
- MonikerHelper.cs
- SymmetricKey.cs
- RuleConditionDialog.Designer.cs
- externdll.cs
- StdRegProviderWrapper.cs
- NumericUpDownAccelerationCollection.cs
- PartialArray.cs
- HttpProxyCredentialType.cs
- DomainUpDown.cs
- MediaContext.cs
- HtmlElementCollection.cs
- IndicFontClient.cs
- NameTable.cs
- ReceiveActivityDesignerTheme.cs
- PermissionAttributes.cs
- DBParameter.cs
- AnnotationAdorner.cs
- EventProviderWriter.cs
- ClickablePoint.cs
- DataObjectMethodAttribute.cs
- LinqDataSourceHelper.cs
- QilSortKey.cs
- SocketAddress.cs
- ProtocolsSection.cs
- EntryPointNotFoundException.cs
- SqlDataSourceTableQuery.cs
- CodeCompileUnit.cs
- Animatable.cs
- Light.cs
- SqlTriggerContext.cs
- RadioButton.cs
- RelationalExpressions.cs
- LinearKeyFrames.cs
- X509Chain.cs
- MediaContextNotificationWindow.cs
- BoolExpr.cs
- EntityDataSourceChangingEventArgs.cs
- NameNode.cs
- MenuItemBinding.cs
- OleAutBinder.cs
- ProviderMetadata.cs
- TypeRestriction.cs
- GenerateTemporaryAssemblyTask.cs
- LinkedResourceCollection.cs
- PageEventArgs.cs
- DecoratedNameAttribute.cs
- PackageStore.cs
- GroupBoxRenderer.cs
- TypeValidationEventArgs.cs
- MediaPlayerState.cs
- SaveFileDialog.cs
- XmlQueryContext.cs
- CorrelationResolver.cs
- CustomAttributeFormatException.cs
- Win32MouseDevice.cs
- PropertyIdentifier.cs
- ScriptRegistrationManager.cs
- ContentDesigner.cs
- ImageMap.cs
- httpstaticobjectscollection.cs
- Stack.cs