Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / Validation / PropertyValidationContext.cs / 1305376 / PropertyValidationContext.cs
namespace System.Workflow.ComponentModel.Compiler { using System; using System.Reflection; #region PropertyValidationContext public sealed class PropertyValidationContext { private string propertyName = string.Empty; private object propertyOwner = null; private object propertyInfo = null; public PropertyValidationContext(object propertyOwner, PropertyInfo propertyInfo, string propertyName) { if (propertyName == null) throw new ArgumentNullException("propertyName"); if (propertyOwner == null) throw new ArgumentNullException("propertyOwner"); this.propertyOwner = propertyOwner; this.propertyName = propertyName; this.propertyInfo = propertyInfo; } public PropertyValidationContext(object propertyOwner, DependencyProperty dependencyProperty) { if (propertyOwner == null) throw new ArgumentNullException("propertyOwner"); this.propertyOwner = propertyOwner; this.propertyInfo = dependencyProperty; } public string PropertyName { get { if (this.propertyInfo is DependencyProperty) return ((DependencyProperty)this.propertyInfo).Name; else return this.propertyName; } } public object PropertyOwner { get { return this.propertyOwner; } } public object Property { get { return this.propertyInfo; } } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel.Compiler { using System; using System.Reflection; #region PropertyValidationContext public sealed class PropertyValidationContext { private string propertyName = string.Empty; private object propertyOwner = null; private object propertyInfo = null; public PropertyValidationContext(object propertyOwner, PropertyInfo propertyInfo, string propertyName) { if (propertyName == null) throw new ArgumentNullException("propertyName"); if (propertyOwner == null) throw new ArgumentNullException("propertyOwner"); this.propertyOwner = propertyOwner; this.propertyName = propertyName; this.propertyInfo = propertyInfo; } public PropertyValidationContext(object propertyOwner, DependencyProperty dependencyProperty) { if (propertyOwner == null) throw new ArgumentNullException("propertyOwner"); this.propertyOwner = propertyOwner; this.propertyInfo = dependencyProperty; } public string PropertyName { get { if (this.propertyInfo is DependencyProperty) return ((DependencyProperty)this.propertyInfo).Name; else return this.propertyName; } } public object PropertyOwner { get { return this.propertyOwner; } } public object Property { get { return this.propertyInfo; } } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FontSource.cs
- DependencyPropertyDescriptor.cs
- ScrollChrome.cs
- ComEventsMethod.cs
- VBIdentifierNameEditor.cs
- METAHEADER.cs
- MatrixAnimationUsingKeyFrames.cs
- SystemColorTracker.cs
- MethodCallExpression.cs
- ResourceExpression.cs
- Command.cs
- ControlUtil.cs
- OciEnlistContext.cs
- DefaultProxySection.cs
- RoleManagerEventArgs.cs
- Int32Animation.cs
- securitycriticaldataformultiplegetandset.cs
- Renderer.cs
- GregorianCalendar.cs
- ExceptionHandlersDesigner.cs
- FormClosingEvent.cs
- HatchBrush.cs
- BinaryVersion.cs
- HyperlinkAutomationPeer.cs
- DataControlCommands.cs
- SecurityDocument.cs
- VisualBasicSettingsHandler.cs
- UrlMappingCollection.cs
- PersonalizablePropertyEntry.cs
- RequestTimeoutManager.cs
- SqlXmlStorage.cs
- TreeNodeBinding.cs
- EncryptedReference.cs
- PreDigestedSignedInfo.cs
- XPathItem.cs
- OracleBFile.cs
- CopyAttributesAction.cs
- QilGenerator.cs
- DelayDesigner.cs
- ToolStripRendererSwitcher.cs
- SecurityTimestamp.cs
- WhitespaceRule.cs
- DefaultTraceListener.cs
- EventHandlerList.cs
- Pkcs7Signer.cs
- XmlSchemaFacet.cs
- CookieHandler.cs
- MenuItem.cs
- StackOverflowException.cs
- ChooseAction.cs
- DataError.cs
- JpegBitmapEncoder.cs
- HttpException.cs
- DataListItem.cs
- XmlNodeChangedEventArgs.cs
- objectresult_tresulttype.cs
- Visitors.cs
- ExceptionValidationRule.cs
- XmlSchemaValidator.cs
- TraceData.cs
- ComplusTypeValidator.cs
- List.cs
- RootDesignerSerializerAttribute.cs
- FormViewInsertedEventArgs.cs
- Rijndael.cs
- AbstractDataSvcMapFileLoader.cs
- UnsafePeerToPeerMethods.cs
- StatusBarItem.cs
- ScriptReference.cs
- ValidationPropertyAttribute.cs
- OleDbMetaDataFactory.cs
- HttpListenerContext.cs
- Context.cs
- UserPreferenceChangedEventArgs.cs
- SR.cs
- FixedSOMGroup.cs
- UserControlAutomationPeer.cs
- XmlIterators.cs
- AxHost.cs
- SpotLight.cs
- NameValuePermission.cs
- SurrogateEncoder.cs
- SoapHeaders.cs
- StyleXamlTreeBuilder.cs
- Timeline.cs
- StateMachineWorkflowInstance.cs
- PlainXmlDeserializer.cs
- commandenforcer.cs
- Utils.cs
- UnsafeNativeMethods.cs
- VirtualPathProvider.cs
- XPathNodeInfoAtom.cs
- PointF.cs
- HandlerMappingMemo.cs
- AncillaryOps.cs
- PtsHelper.cs
- GeometryDrawing.cs
- FrameworkContentElementAutomationPeer.cs
- OleDbDataAdapter.cs
- PenLineCapValidation.cs