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
- ControlValuePropertyAttribute.cs
- InputManager.cs
- DataServiceBehavior.cs
- StreamUpdate.cs
- PrintingPermission.cs
- MetafileHeader.cs
- FontFamilyValueSerializer.cs
- ItemCheckedEvent.cs
- AuthenticationModuleElementCollection.cs
- ModifierKeysConverter.cs
- ActiveXHost.cs
- BuildProviderAppliesToAttribute.cs
- WebResponse.cs
- XamlGridLengthSerializer.cs
- TextContainerChangeEventArgs.cs
- MsmqHostedTransportConfiguration.cs
- HitTestParameters3D.cs
- Equal.cs
- ToolStripComboBox.cs
- SmiEventSink.cs
- MessageBox.cs
- WizardStepBase.cs
- Padding.cs
- AppLevelCompilationSectionCache.cs
- ColorContext.cs
- HyperLinkField.cs
- CurrentChangingEventManager.cs
- StorageBasedPackageProperties.cs
- Transform3D.cs
- PrintPreviewDialog.cs
- recordstate.cs
- ColorIndependentAnimationStorage.cs
- DataGrid.cs
- NativeRightsManagementAPIsStructures.cs
- UnitControl.cs
- SecurityTokenParameters.cs
- METAHEADER.cs
- FlowDocumentFormatter.cs
- InvokeBinder.cs
- BindingExpression.cs
- IDataContractSurrogate.cs
- PermissionAttributes.cs
- CharUnicodeInfo.cs
- AppDomain.cs
- SoapClientProtocol.cs
- UIPermission.cs
- CompoundFileStreamReference.cs
- NodeLabelEditEvent.cs
- hwndwrapper.cs
- MarkupExtensionReturnTypeAttribute.cs
- OrElse.cs
- ZoneButton.cs
- CodeActivityMetadata.cs
- EncoderParameters.cs
- SparseMemoryStream.cs
- ValidationError.cs
- XpsResourcePolicy.cs
- XMLDiffLoader.cs
- XmlDictionaryString.cs
- WarningException.cs
- SharedUtils.cs
- DbProviderFactories.cs
- SQLInt16.cs
- HttpClientCertificate.cs
- ExtenderProvidedPropertyAttribute.cs
- GreaterThan.cs
- LocalizationComments.cs
- CompositeKey.cs
- MailAddress.cs
- ElementUtil.cs
- XmlAutoDetectWriter.cs
- InvalidTimeZoneException.cs
- CodeSnippetStatement.cs
- DomainLiteralReader.cs
- Matrix3DConverter.cs
- SchemaImporterExtensionsSection.cs
- SHA1Managed.cs
- SQLMoney.cs
- SqlPersistenceProviderFactory.cs
- EndPoint.cs
- GradientStopCollection.cs
- PersonalizationState.cs
- EventWaitHandleSecurity.cs
- PostBackTrigger.cs
- __ComObject.cs
- DictionaryItemsCollection.cs
- SQlBooleanStorage.cs
- StateMachineExecutionState.cs
- SqlReorderer.cs
- VisualBasicImportReference.cs
- Subtree.cs
- Animatable.cs
- DefinitionUpdate.cs
- TabItemAutomationPeer.cs
- DataTemplateKey.cs
- PieceDirectory.cs
- ValidateNames.cs
- XmlSchemaSimpleContentRestriction.cs
- BaseProcessor.cs
- MeshGeometry3D.cs