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
- StateWorkerRequest.cs
- SafeRightsManagementPubHandle.cs
- EntityDataSourceView.cs
- DataGridPageChangedEventArgs.cs
- QilGeneratorEnv.cs
- LabelLiteral.cs
- SemaphoreSecurity.cs
- ProxyOperationRuntime.cs
- Helpers.cs
- PropertyInfo.cs
- VScrollBar.cs
- CalendarDay.cs
- ZoneMembershipCondition.cs
- CompleteWizardStep.cs
- ControlValuePropertyAttribute.cs
- ImageListUtils.cs
- KeyEvent.cs
- RegistryKey.cs
- TabPanel.cs
- CheckBoxStandardAdapter.cs
- SafeHandles.cs
- TraceContext.cs
- CodeTypeMemberCollection.cs
- WebPartsSection.cs
- X509ChainElement.cs
- SystemGatewayIPAddressInformation.cs
- PointCollection.cs
- WebServiceData.cs
- CodeGroup.cs
- DataControlFieldHeaderCell.cs
- SoapCodeExporter.cs
- StructuredProperty.cs
- DownloadProgressEventArgs.cs
- SqlReorderer.cs
- DragDeltaEventArgs.cs
- DelayedRegex.cs
- ObjectDataSource.cs
- ChtmlImageAdapter.cs
- Funcletizer.cs
- FontSource.cs
- XmlBindingWorker.cs
- _ChunkParse.cs
- DelegatingHeader.cs
- ObjectToIdCache.cs
- ConnectionStringsExpressionEditor.cs
- BrowserCapabilitiesCodeGenerator.cs
- ActiveDocumentEvent.cs
- HttpVersion.cs
- InheritanceContextChangedEventManager.cs
- GroupBox.cs
- DictionarySectionHandler.cs
- MaskDescriptor.cs
- InheritanceContextHelper.cs
- SafeProcessHandle.cs
- IsolatedStorageFile.cs
- Emitter.cs
- RemotingConfigParser.cs
- IndicFontClient.cs
- OrderedDictionary.cs
- XmlComment.cs
- PropertiesTab.cs
- CodeExporter.cs
- CrossSiteScriptingValidation.cs
- SnapshotChangeTrackingStrategy.cs
- EmptyCollection.cs
- ObjectQueryExecutionPlan.cs
- ContractMapping.cs
- XmlProcessingInstruction.cs
- DataGrid.cs
- RangeValueProviderWrapper.cs
- ContextStack.cs
- TextSelectionHighlightLayer.cs
- SafeCloseHandleCritical.cs
- PermissionSetTriple.cs
- PeerApplication.cs
- BmpBitmapEncoder.cs
- XmlSchemaParticle.cs
- AnnotationStore.cs
- VirtualStackFrame.cs
- DecoderReplacementFallback.cs
- SchemaElementDecl.cs
- ToolboxItemCollection.cs
- EmptyQuery.cs
- InternalMappingException.cs
- BoolLiteral.cs
- Pts.cs
- ApplicationManager.cs
- ASCIIEncoding.cs
- ResXDataNode.cs
- TextEditorCopyPaste.cs
- ConfigXmlCDataSection.cs
- XmlSchemaAnnotated.cs
- SwitchLevelAttribute.cs
- EntityDataSourceDataSelectionPanel.cs
- DataGridViewComboBoxCell.cs
- WorkflowOperationErrorHandler.cs
- ComplexObject.cs
- DiscoveryDocumentReference.cs
- QueryAccessibilityHelpEvent.cs
- EntityAdapter.cs