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
- ParentUndoUnit.cs
- VerificationAttribute.cs
- Activator.cs
- ProcessThread.cs
- Types.cs
- BitFlagsGenerator.cs
- DataSourceHelper.cs
- BamlResourceContent.cs
- AdornerHitTestResult.cs
- WebPart.cs
- TreeNode.cs
- ProcessHostConfigUtils.cs
- COM2ExtendedBrowsingHandler.cs
- GiveFeedbackEvent.cs
- BatchWriter.cs
- BinaryMethodMessage.cs
- CodeTypeReference.cs
- StoragePropertyMapping.cs
- FontResourceCache.cs
- BaseResourcesBuildProvider.cs
- AbstractDataSvcMapFileLoader.cs
- ExtractorMetadata.cs
- RadioButtonStandardAdapter.cs
- _ScatterGatherBuffers.cs
- WebServiceParameterData.cs
- ConsoleTraceListener.cs
- StateItem.cs
- FreezableDefaultValueFactory.cs
- ConfigurationLocationCollection.cs
- SqlMethodCallConverter.cs
- UTF8Encoding.cs
- GlyphTypeface.cs
- ResourcePool.cs
- StylusCollection.cs
- State.cs
- WorkflowInstanceTerminatedRecord.cs
- DbDataAdapter.cs
- GridViewEditEventArgs.cs
- MouseEvent.cs
- OdbcParameterCollection.cs
- PositiveTimeSpanValidator.cs
- CounterCreationDataCollection.cs
- EntityViewGenerator.cs
- XmlDictionary.cs
- SqlClientWrapperSmiStreamChars.cs
- SmiEventSink_DeferedProcessing.cs
- Run.cs
- MapPathBasedVirtualPathProvider.cs
- HierarchicalDataSourceConverter.cs
- InstalledFontCollection.cs
- ipaddressinformationcollection.cs
- TextTreePropertyUndoUnit.cs
- SystemTcpStatistics.cs
- LoginDesignerUtil.cs
- HttpGetServerProtocol.cs
- figurelength.cs
- SecurityPolicySection.cs
- ObjectManager.cs
- CorrelationManager.cs
- XmlBuffer.cs
- ListSortDescription.cs
- ToolStripContentPanel.cs
- MobileContainerDesigner.cs
- TransformGroup.cs
- SchemaImporterExtensionElement.cs
- ResourceContainer.cs
- TransactionProtocolConverter.cs
- EventLogTraceListener.cs
- XamlTemplateSerializer.cs
- DataGridViewCellCollection.cs
- XmlSchemaException.cs
- ListBindingHelper.cs
- DataListItem.cs
- externdll.cs
- ContravarianceAdapter.cs
- RegexReplacement.cs
- SiteMapHierarchicalDataSourceView.cs
- RelatedView.cs
- BookmarkScopeManager.cs
- ComponentResourceKey.cs
- PermissionToken.cs
- CardSpacePolicyElement.cs
- PageBuildProvider.cs
- CqlParser.cs
- FormatSettings.cs
- ExternalFile.cs
- dsa.cs
- _ConnectStream.cs
- CompositeActivityCodeGenerator.cs
- XpsS0ValidatingLoader.cs
- MouseEventArgs.cs
- BuildProviderAppliesToAttribute.cs
- CustomAttribute.cs
- NetCodeGroup.cs
- ChannelPoolSettings.cs
- SqlDataSourceSelectingEventArgs.cs
- MediaScriptCommandRoutedEventArgs.cs
- Base64Encoder.cs
- WindowsToolbarAsMenu.cs
- SafeThreadHandle.cs