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
- AttributeCollection.cs
- DataGridAddNewRow.cs
- HtmlInputControl.cs
- ValidatingReaderNodeData.cs
- ValidationRuleCollection.cs
- Choices.cs
- PasswordPropertyTextAttribute.cs
- AppSettingsReader.cs
- SocketAddress.cs
- DefinitionBase.cs
- PresentationTraceSources.cs
- DbgUtil.cs
- XmlILTrace.cs
- EndpointIdentityExtension.cs
- ParsedAttributeCollection.cs
- DataMemberAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- SimpleBitVector32.cs
- TableLayoutCellPaintEventArgs.cs
- DataMember.cs
- IImplicitResourceProvider.cs
- Rule.cs
- SiteOfOriginContainer.cs
- XmlDownloadManager.cs
- ArgumentException.cs
- X509Certificate2.cs
- ChangeTracker.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- BitmapFrameDecode.cs
- HttpCacheParams.cs
- WebPartDescription.cs
- MenuItemBinding.cs
- PhysicalFontFamily.cs
- OracleConnectionString.cs
- SignatureHelper.cs
- AlternateViewCollection.cs
- XomlSerializationHelpers.cs
- DataSourceXmlClassAttribute.cs
- IntellisenseTextBox.cs
- RsaSecurityKey.cs
- XmlNodeReader.cs
- CustomTypeDescriptor.cs
- UpdateException.cs
- cache.cs
- MobileControlsSectionHelper.cs
- NativeMethods.cs
- ViewUtilities.cs
- PagedDataSource.cs
- MailAddressCollection.cs
- WebPartAuthorizationEventArgs.cs
- Queue.cs
- RemoteDebugger.cs
- RoleService.cs
- PaperSize.cs
- HtmlInputText.cs
- TargetControlTypeAttribute.cs
- DBSchemaTable.cs
- MultiPageTextView.cs
- ObjectDataSourceDesigner.cs
- ConfigXmlSignificantWhitespace.cs
- NamespaceCollection.cs
- VisualCollection.cs
- EpmCustomContentSerializer.cs
- TextControlDesigner.cs
- RenderDataDrawingContext.cs
- FigureParagraph.cs
- DesignerVerbCollection.cs
- MessageContractExporter.cs
- PageSetupDialog.cs
- TraceUtility.cs
- OdbcTransaction.cs
- EventArgs.cs
- TdsParserStateObject.cs
- SHA384.cs
- RegistryExceptionHelper.cs
- WebPartDisplayMode.cs
- XmlToDatasetMap.cs
- Polyline.cs
- MsmqSecureHashAlgorithm.cs
- ImageSourceValueSerializer.cs
- PathTooLongException.cs
- ListMarkerLine.cs
- FaultHandlingFilter.cs
- dtdvalidator.cs
- SimpleTypeResolver.cs
- SubclassTypeValidatorAttribute.cs
- DataServiceConfiguration.cs
- ConfigurationManagerHelperFactory.cs
- SequenceQuery.cs
- ResXResourceReader.cs
- OpenTypeLayout.cs
- Part.cs
- FlowDocumentFormatter.cs
- RotationValidation.cs
- ArgIterator.cs
- ExpressionBindingCollection.cs
- UserInitiatedNavigationPermission.cs
- WinFormsSecurity.cs
- CodeTypeDelegate.cs
- DataBinder.cs