Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / Runtime / TypedLocationWrapper.cs / 1305376 / TypedLocationWrapper.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities { using System.Runtime; using System.Runtime.Serialization; // Users of this class need to be VERY careful because TypedLocationWrapper // will happily wrap an inner location of any type. This, however, could // cause an issue when attempting to get or set the value unless the inner // location's Type matches exactly. If the use of the wrapper will be // constrained to either get or set then non-matching (but compatible) types // can be used. One example of this is when wrapping a location for use // with an out argument. Since out arguments buffer reads from their own // location, we know that only set will be called on this underlying // wrapper. [DataContract] class TypedLocationWrapper: Location { [DataMember] Location innerLocation; public TypedLocationWrapper(Location innerLocation) : base() { this.innerLocation = innerLocation; } internal override bool CanBeMapped { get { return this.innerLocation.CanBeMapped; } } public override T Value { get { return (T)this.innerLocation.Value; } set { this.innerLocation.Value = value; } } public override string ToString() { return this.innerLocation.ToString(); } } } // 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
- DurableErrorHandler.cs
- ReflectionUtil.cs
- StringSource.cs
- SqlSelectStatement.cs
- XmlSchemaAny.cs
- CoTaskMemUnicodeSafeHandle.cs
- SamlConditions.cs
- FixedSOMLineRanges.cs
- GlyphShapingProperties.cs
- UserControlAutomationPeer.cs
- TemplateBaseAction.cs
- DesignerAdapterAttribute.cs
- URL.cs
- MethodBuilder.cs
- Deserializer.cs
- PublishLicense.cs
- ContentElementCollection.cs
- hebrewshape.cs
- Point4D.cs
- DefinitionBase.cs
- FrameworkEventSource.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- InitializationEventAttribute.cs
- ReachDocumentReferenceCollectionSerializer.cs
- SqlCacheDependency.cs
- LogPolicy.cs
- _UriTypeConverter.cs
- BuildResultCache.cs
- BasicCellRelation.cs
- FilterException.cs
- PopupEventArgs.cs
- AccessedThroughPropertyAttribute.cs
- TextEncodedRawTextWriter.cs
- CheckBox.cs
- Component.cs
- DSASignatureFormatter.cs
- ToolStripManager.cs
- QilReference.cs
- InteropAutomationProvider.cs
- PrtTicket_Editor.cs
- BindingCollection.cs
- ValueProviderWrapper.cs
- HttpRuntimeSection.cs
- CompositeScriptReference.cs
- HtmlInputHidden.cs
- FunctionDescription.cs
- ConfigsHelper.cs
- WorkerProcess.cs
- ListViewInsertEventArgs.cs
- CodeDefaultValueExpression.cs
- DelegatingMessage.cs
- SpnegoTokenAuthenticator.cs
- MenuItemBindingCollection.cs
- LinqExpressionNormalizer.cs
- FactoryId.cs
- ExpandoClass.cs
- InsufficientMemoryException.cs
- GifBitmapEncoder.cs
- CodeSnippetExpression.cs
- DataGridTextBox.cs
- Util.cs
- PublisherIdentityPermission.cs
- xmlformatgeneratorstatics.cs
- EncodingInfo.cs
- BuildDependencySet.cs
- FrameworkElementFactoryMarkupObject.cs
- TimeZone.cs
- AlgoModule.cs
- ToolStripOverflow.cs
- DataSpaceManager.cs
- SerializationObjectManager.cs
- StateDesigner.TransitionInfo.cs
- ArgumentNullException.cs
- FontStyle.cs
- CodeLabeledStatement.cs
- SqlCharStream.cs
- infer.cs
- CalendarTable.cs
- PcmConverter.cs
- CultureInfoConverter.cs
- DateTimeConstantAttribute.cs
- RSACryptoServiceProvider.cs
- DialogBaseForm.cs
- WindowsProgressbar.cs
- Version.cs
- EntityDesignerUtils.cs
- QueryOutputWriter.cs
- NumericUpDownAccelerationCollection.cs
- AsmxEndpointPickerExtension.cs
- GlyphRun.cs
- DataAccessException.cs
- thaishape.cs
- HiddenFieldPageStatePersister.cs
- HuffmanTree.cs
- PointHitTestParameters.cs
- KnowledgeBase.cs
- OperandQuery.cs
- MonthChangedEventArgs.cs
- Int64AnimationUsingKeyFrames.cs
- PageAsyncTaskManager.cs