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
- ListViewDeletedEventArgs.cs
- UserCancellationException.cs
- Helpers.cs
- DataGridItemCollection.cs
- CorrelationResolver.cs
- EncoderParameters.cs
- StoreItemCollection.Loader.cs
- StringAttributeCollection.cs
- DBPropSet.cs
- DesignerWebPartChrome.cs
- __FastResourceComparer.cs
- NativeRecognizer.cs
- AnimatedTypeHelpers.cs
- SqlPersonalizationProvider.cs
- WebPart.cs
- NumericExpr.cs
- DataColumnPropertyDescriptor.cs
- ParseChildrenAsPropertiesAttribute.cs
- ScrollChrome.cs
- DbConnectionPoolGroup.cs
- ObjectAnimationUsingKeyFrames.cs
- ErrorWebPart.cs
- ImageClickEventArgs.cs
- PeerNameRegistration.cs
- ContextMenuAutomationPeer.cs
- TableDesigner.cs
- SHA512Managed.cs
- ScrollViewerAutomationPeer.cs
- Bits.cs
- FastPropertyAccessor.cs
- LayoutTableCell.cs
- Lease.cs
- UInt32.cs
- DefaultSerializationProviderAttribute.cs
- HitTestWithPointDrawingContextWalker.cs
- ToolStripProgressBar.cs
- ImageMap.cs
- SocketException.cs
- Schema.cs
- CacheHelper.cs
- Attributes.cs
- Range.cs
- MenuItemStyleCollection.cs
- SqlNodeTypeOperators.cs
- FamilyTypefaceCollection.cs
- ProfessionalColorTable.cs
- AuthStoreRoleProvider.cs
- DateTimeOffsetConverter.cs
- SqlPersonalizationProvider.cs
- ToolStripPanelRow.cs
- ToolStripSettings.cs
- XmlSchemaNotation.cs
- BasePattern.cs
- KnownBoxes.cs
- WindowsSpinner.cs
- SoapInteropTypes.cs
- BinaryWriter.cs
- GridItemPattern.cs
- PointCollection.cs
- DomainConstraint.cs
- DateTimeParse.cs
- DataServiceResponse.cs
- ByValueEqualityComparer.cs
- DbConnectionClosed.cs
- LineVisual.cs
- Vector3DConverter.cs
- LoggedException.cs
- CodeComment.cs
- ObjectDataSource.cs
- IndentedWriter.cs
- httpserverutility.cs
- PathFigure.cs
- InstalledFontCollection.cs
- VirtualPath.cs
- FunctionImportMapping.cs
- ObjectFullSpanRewriter.cs
- SoundPlayer.cs
- XmlImplementation.cs
- SafeUserTokenHandle.cs
- FontFamily.cs
- TreeNode.cs
- FieldBuilder.cs
- MinimizableAttributeTypeConverter.cs
- SerializerProvider.cs
- QueryStringParameter.cs
- ObjectStorage.cs
- DataSpaceManager.cs
- DataGridRow.cs
- DateTimeOffsetStorage.cs
- UpdatePanelTrigger.cs
- StateMachineDesignerPaint.cs
- SurrogateSelector.cs
- ScriptingSectionGroup.cs
- ProviderUtil.cs
- WebPartExportVerb.cs
- Keywords.cs
- RepeaterItemCollection.cs
- SystemResources.cs
- DataGridCellInfo.cs
- ReadOnlyHierarchicalDataSourceView.cs