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
- contentDescriptor.cs
- EventDrivenDesigner.cs
- SafeFileHandle.cs
- DataGrid.cs
- MimeMultiPart.cs
- WebZone.cs
- UTF8Encoding.cs
- ActivationServices.cs
- MessageQueueConverter.cs
- OleDbStruct.cs
- NamespaceInfo.cs
- WindowsSolidBrush.cs
- TraceContextEventArgs.cs
- SearchExpression.cs
- ConfigurationSchemaErrors.cs
- ObjectAssociationEndMapping.cs
- TypeListConverter.cs
- ExpressionConverter.cs
- XmlCustomFormatter.cs
- XmlSchemaDatatype.cs
- StructuralType.cs
- LoginDesigner.cs
- KeyBinding.cs
- ApplicationBuildProvider.cs
- CodeGroup.cs
- ChunkedMemoryStream.cs
- HwndMouseInputProvider.cs
- Utils.cs
- LayoutUtils.cs
- TextBox.cs
- ProviderBase.cs
- StringHandle.cs
- DataGridViewCellPaintingEventArgs.cs
- CollectionContainer.cs
- ToolStripDropDown.cs
- CapabilitiesAssignment.cs
- ToolStripItemClickedEventArgs.cs
- ClaimTypeElement.cs
- DesignSurfaceCollection.cs
- PersonalizablePropertyEntry.cs
- SafeRightsManagementPubHandle.cs
- SqlCacheDependencyDatabaseCollection.cs
- UIAgentRequest.cs
- GridLengthConverter.cs
- ManagedWndProcTracker.cs
- InputLanguageEventArgs.cs
- ConnectionManagementSection.cs
- SystemPens.cs
- KeyValuePairs.cs
- NavigationWindowAutomationPeer.cs
- MultiByteCodec.cs
- ExplicitDiscriminatorMap.cs
- GeneralTransformGroup.cs
- OleDbStruct.cs
- CompositeScriptReference.cs
- XmlReaderSettings.cs
- AsyncResult.cs
- TcpConnectionPoolSettings.cs
- DesignSurface.cs
- HitTestResult.cs
- DataGridViewAdvancedBorderStyle.cs
- AssemblyBuilderData.cs
- UpdatableGenericsFeature.cs
- MetadataArtifactLoader.cs
- BaseConfigurationRecord.cs
- TabControlEvent.cs
- HtmlInputControl.cs
- UserControl.cs
- BamlBinaryReader.cs
- ObjectSet.cs
- RoleServiceManager.cs
- MissingMethodException.cs
- FixUp.cs
- CriticalExceptions.cs
- Evaluator.cs
- KnownBoxes.cs
- OperationAbortedException.cs
- CompressionTransform.cs
- CompositeFontParser.cs
- QuaternionAnimationBase.cs
- StreamGeometryContext.cs
- OdbcEnvironment.cs
- HeaderPanel.cs
- GeneralTransform3D.cs
- ContentValidator.cs
- Choices.cs
- Cursors.cs
- CopyOfAction.cs
- ResourceManagerWrapper.cs
- DeclarativeCatalogPart.cs
- ExecutionEngineException.cs
- _ConnectOverlappedAsyncResult.cs
- InsufficientExecutionStackException.cs
- cookiecontainer.cs
- ParameterCollection.cs
- ReachPrintTicketSerializerAsync.cs
- ProviderUtil.cs
- XsdDateTime.cs
- PartDesigner.cs
- LinkArea.cs