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
- BitmapEffectInput.cs
- MouseActionConverter.cs
- SynchronizationLockException.cs
- DiscoveryMessageSequenceGenerator.cs
- Mapping.cs
- RequestCachingSection.cs
- StringFormat.cs
- Model3D.cs
- CodeAttributeArgumentCollection.cs
- XhtmlBasicCalendarAdapter.cs
- BeginStoryboard.cs
- GeometryHitTestResult.cs
- Helpers.cs
- ClosableStream.cs
- StrongNameKeyPair.cs
- MissingFieldException.cs
- ExpressionBuilder.cs
- UnknownBitmapEncoder.cs
- MasterPage.cs
- RowVisual.cs
- XamlVector3DCollectionSerializer.cs
- ServiceOperationParameter.cs
- Timer.cs
- Track.cs
- CorrelationManager.cs
- NodeInfo.cs
- MailBnfHelper.cs
- Debug.cs
- ButtonBaseDesigner.cs
- TableCell.cs
- XmlWriterTraceListener.cs
- SharedPerformanceCounter.cs
- ObjRef.cs
- DataServiceProcessingPipelineEventArgs.cs
- SystemFonts.cs
- DesignerDataColumn.cs
- PropertyItemInternal.cs
- XmlHelper.cs
- SoapCodeExporter.cs
- PlainXmlSerializer.cs
- EncodingNLS.cs
- DoubleAnimationUsingPath.cs
- ETagAttribute.cs
- MsmqAuthenticationMode.cs
- MailWebEventProvider.cs
- RepeaterItem.cs
- PropertyGridDesigner.cs
- MaskedTextProvider.cs
- SQLDateTimeStorage.cs
- SafeRightsManagementEnvironmentHandle.cs
- LambdaCompiler.Expressions.cs
- URL.cs
- WindowsToolbar.cs
- RelationshipConverter.cs
- SafeRightsManagementQueryHandle.cs
- UserPrincipalNameElement.cs
- MimeMapping.cs
- FunctionUpdateCommand.cs
- OleDbParameterCollection.cs
- WebPartRestoreVerb.cs
- WebResourceAttribute.cs
- PrinterUnitConvert.cs
- DataGridViewRowEventArgs.cs
- __Filters.cs
- OutputCacheSettings.cs
- ParentQuery.cs
- SafeArrayTypeMismatchException.cs
- FeatureManager.cs
- PenCursorManager.cs
- baseaxisquery.cs
- CultureNotFoundException.cs
- WebConfigurationManager.cs
- VirtualDirectoryMappingCollection.cs
- TextReader.cs
- StatusStrip.cs
- GCHandleCookieTable.cs
- XmlJsonWriter.cs
- MimeReflector.cs
- XXXInfos.cs
- OpacityConverter.cs
- XPathEmptyIterator.cs
- PeerApplicationLaunchInfo.cs
- XmlBinaryReaderSession.cs
- BuildProviderCollection.cs
- RegexMatchCollection.cs
- QueueNameHelper.cs
- ErrorHandler.cs
- GiveFeedbackEventArgs.cs
- BinaryUtilClasses.cs
- TileBrush.cs
- Control.cs
- ValueQuery.cs
- CharConverter.cs
- ColumnResizeUndoUnit.cs
- IProvider.cs
- SqlDataSourceFilteringEventArgs.cs
- SQLDecimalStorage.cs
- ThemeDirectoryCompiler.cs
- DynamicPropertyHolder.cs
- XPathNodeHelper.cs