Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Serializer / ModifyActivitiesPropertyDescriptor.cs / 1305376 / ModifyActivitiesPropertyDescriptor.cs
namespace System.Workflow.ComponentModel.Serialization { using System; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Resources; using System.Workflow.ComponentModel.Design; using System.Collections.Generic; using Microsoft.CSharp; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Compiler; using System.CodeDom.Compiler; using System.IO; using System.Reflection; using System.Diagnostics; #region ModifyActivitiesPropertyDescriptor internal class ModifyActivitiesPropertyDescriptor : PropertyDescriptor { private PropertyInfo propInfo = null; public ModifyActivitiesPropertyDescriptor(PropertyInfo propInfo) : base("CanModifyActivities", new Attribute[0]) { this.propInfo = propInfo; } public override bool CanResetValue(object component) { throw new NotImplementedException(); } public override Type ComponentType { get { return typeof(CompositeActivity); } } public override object GetValue(object component) { return this.propInfo.GetValue(component, null); } public override bool IsReadOnly { get { return false; } } public override Type PropertyType { get { return typeof(bool); } } public override void ResetValue(object component) { throw new NotImplementedException(); } public override void SetValue(object component, object value) { this.propInfo.SetValue(component, true, null); // Design time, allow changes if (component is CompositeActivity) (component as CompositeActivity).SetValue(CompositeActivity.CustomActivityProperty, false); } public override bool ShouldSerializeValue(object component) { return false; } } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Workflow.ComponentModel.Serialization { using System; using System.CodeDom; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Serialization; using System.Collections; using System.Resources; using System.Workflow.ComponentModel.Design; using System.Collections.Generic; using Microsoft.CSharp; using System.Workflow.ComponentModel; using System.Workflow.ComponentModel.Compiler; using System.CodeDom.Compiler; using System.IO; using System.Reflection; using System.Diagnostics; #region ModifyActivitiesPropertyDescriptor internal class ModifyActivitiesPropertyDescriptor : PropertyDescriptor { private PropertyInfo propInfo = null; public ModifyActivitiesPropertyDescriptor(PropertyInfo propInfo) : base("CanModifyActivities", new Attribute[0]) { this.propInfo = propInfo; } public override bool CanResetValue(object component) { throw new NotImplementedException(); } public override Type ComponentType { get { return typeof(CompositeActivity); } } public override object GetValue(object component) { return this.propInfo.GetValue(component, null); } public override bool IsReadOnly { get { return false; } } public override Type PropertyType { get { return typeof(bool); } } public override void ResetValue(object component) { throw new NotImplementedException(); } public override void SetValue(object component, object value) { this.propInfo.SetValue(component, true, null); // Design time, allow changes if (component is CompositeActivity) (component as CompositeActivity).SetValue(CompositeActivity.CustomActivityProperty, false); } public override bool ShouldSerializeValue(object component) { return false; } } #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
- DesignParameter.cs
- DataTableMappingCollection.cs
- FunctionDescription.cs
- Menu.cs
- XmlSchemaObjectTable.cs
- UniqueEventHelper.cs
- SqlNodeAnnotations.cs
- DrawingImage.cs
- NameValueSectionHandler.cs
- Application.cs
- PointCollection.cs
- HitTestResult.cs
- ExtensionDataReader.cs
- DesignTimeParseData.cs
- SHA1.cs
- GenericWebPart.cs
- WebPageTraceListener.cs
- RuntimeCompatibilityAttribute.cs
- DrawingVisualDrawingContext.cs
- Helpers.cs
- PersonalizationState.cs
- TextWriterTraceListener.cs
- HitTestParameters.cs
- ChangeProcessor.cs
- EnvelopedPkcs7.cs
- RealizationContext.cs
- SafeSecurityHelper.cs
- ScriptComponentDescriptor.cs
- ValueUtilsSmi.cs
- EntityDataSourceDesignerHelper.cs
- ChineseLunisolarCalendar.cs
- ObjectViewFactory.cs
- DefaultEvaluationContext.cs
- DateTimeFormatInfoScanner.cs
- AssemblySettingAttributes.cs
- LeaseManager.cs
- PackageDigitalSignatureManager.cs
- HttpChannelFactory.cs
- EntityContainerEmitter.cs
- Hashtable.cs
- InvariantComparer.cs
- contentDescriptor.cs
- PrintingPermission.cs
- SponsorHelper.cs
- TemplateControlParser.cs
- DataGridViewCellMouseEventArgs.cs
- HttpHeaderCollection.cs
- CompiledELinqQueryState.cs
- GridPattern.cs
- FirstQueryOperator.cs
- DataDocumentXPathNavigator.cs
- UrlPath.cs
- FixedSchema.cs
- XmlHierarchicalDataSourceView.cs
- Message.cs
- JsonQueryStringConverter.cs
- LingerOption.cs
- UpdateCommandGenerator.cs
- XmlDomTextWriter.cs
- Listbox.cs
- XmlNamespaceDeclarationsAttribute.cs
- TableCellCollection.cs
- DataViewSetting.cs
- DataGridViewDesigner.cs
- QueryOperationResponseOfT.cs
- AssemblyAssociatedContentFileAttribute.cs
- DataControlPagerLinkButton.cs
- CustomCategoryAttribute.cs
- FragmentQueryProcessor.cs
- UriTemplateLiteralPathSegment.cs
- Label.cs
- RemoteWebConfigurationHost.cs
- StylusPointProperties.cs
- TrustLevel.cs
- StrokeNodeEnumerator.cs
- WebPartManager.cs
- GlobalizationSection.cs
- HtmlImage.cs
- TraceLog.cs
- ETagAttribute.cs
- DefaultValidator.cs
- AccessDataSourceView.cs
- WhitespaceRule.cs
- XmlQueryContext.cs
- ProfileGroupSettings.cs
- WebPartZone.cs
- ContentIterators.cs
- WebConfigManager.cs
- ObjectParameter.cs
- XmlSchemaExternal.cs
- SimpleRecyclingCache.cs
- DirectoryInfo.cs
- SqlDependencyUtils.cs
- GenericsInstances.cs
- SmiMetaData.cs
- SoapSchemaExporter.cs
- TimeSpanStorage.cs
- Freezable.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- PropertyInformation.cs