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
- MsmqIntegrationInputChannel.cs
- RotateTransform3D.cs
- HttpDictionary.cs
- WindowsIdentity.cs
- SecurityKeyIdentifierClause.cs
- UniqueIdentifierService.cs
- GreenMethods.cs
- SHA512.cs
- TrackingDataItemValue.cs
- BulletChrome.cs
- CommandBinding.cs
- SQLResource.cs
- FacetChecker.cs
- AccessText.cs
- CultureSpecificStringDictionary.cs
- WebPartTracker.cs
- AuthorizationRuleCollection.cs
- TaiwanLunisolarCalendar.cs
- ExpressionsCollectionConverter.cs
- TraceListeners.cs
- ComAdminInterfaces.cs
- BulletedListEventArgs.cs
- TaskHelper.cs
- VisualBasicExpressionConverter.cs
- CompiledRegexRunner.cs
- GetWinFXPath.cs
- InheritanceService.cs
- RequestNavigateEventArgs.cs
- SerTrace.cs
- StringFunctions.cs
- newinstructionaction.cs
- COM2IPerPropertyBrowsingHandler.cs
- SiteMapSection.cs
- NegatedConstant.cs
- InkPresenter.cs
- RelOps.cs
- Rotation3D.cs
- SchemaImporterExtension.cs
- HttpDigestClientElement.cs
- ZipIOLocalFileHeader.cs
- ObjectConverter.cs
- DataTablePropertyDescriptor.cs
- AssociationSet.cs
- OracleBoolean.cs
- DbgCompiler.cs
- MenuBase.cs
- ListenerBinder.cs
- WindowAutomationPeer.cs
- ADConnectionHelper.cs
- XhtmlBasicFormAdapter.cs
- DebugTracing.cs
- XsltException.cs
- CodeConstructor.cs
- TCEAdapterGenerator.cs
- RenderingEventArgs.cs
- Sql8ConformanceChecker.cs
- JsonReader.cs
- SqlBulkCopy.cs
- TdsParserHelperClasses.cs
- ReflectionTypeLoadException.cs
- SigningDialog.cs
- SecuritySessionClientSettings.cs
- NonParentingControl.cs
- ipaddressinformationcollection.cs
- Point.cs
- FocusChangedEventArgs.cs
- XmlSchemaAttribute.cs
- MarkupObject.cs
- ContactManager.cs
- PerformanceCountersElement.cs
- OracleParameter.cs
- ChannelPoolSettings.cs
- XamlFxTrace.cs
- Rectangle.cs
- CriticalHandle.cs
- ApplicationServiceManager.cs
- DynamicRendererThreadManager.cs
- FieldToken.cs
- AddInProcess.cs
- VolatileEnlistmentMultiplexing.cs
- SapiAttributeParser.cs
- ListComponentEditorPage.cs
- SqlCacheDependencySection.cs
- StrokeNodeOperations2.cs
- OleDbDataAdapter.cs
- GroupBoxRenderer.cs
- ProgramNode.cs
- ApplicationException.cs
- Binding.cs
- Memoizer.cs
- LinkLabel.cs
- LocalizableAttribute.cs
- ComplusEndpointConfigContainer.cs
- AudioFileOut.cs
- SqlCacheDependency.cs
- ConnectionManagementElement.cs
- OpCodes.cs
- String.cs
- CollectionBase.cs
- FileNameEditor.cs