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
- AssemblyResourceLoader.cs
- PersonalizablePropertyEntry.cs
- IpcPort.cs
- XmlSchemaInclude.cs
- TypeElement.cs
- BitmapEffectDrawing.cs
- BatchWriter.cs
- Int64.cs
- CryptoStream.cs
- DescendantBaseQuery.cs
- ContainerUIElement3D.cs
- DataProviderNameConverter.cs
- WorkBatch.cs
- MethodBuilder.cs
- UIElementIsland.cs
- BitmapEffect.cs
- TypeConverterMarkupExtension.cs
- TextRange.cs
- RowVisual.cs
- AmbiguousMatchException.cs
- DiagnosticsConfiguration.cs
- TabPageDesigner.cs
- HtmlPageAdapter.cs
- ByteStack.cs
- ValuePatternIdentifiers.cs
- HybridCollection.cs
- SqlLiftIndependentRowExpressions.cs
- ServiceNameElement.cs
- ListViewAutomationPeer.cs
- AuthorizationRule.cs
- OleDbError.cs
- ColumnMap.cs
- WebPartEditVerb.cs
- SqlDataSourceWizardForm.cs
- InvalidAsynchronousStateException.cs
- DataGridCheckBoxColumn.cs
- NullReferenceException.cs
- CompilerGlobalScopeAttribute.cs
- TextDecorations.cs
- Axis.cs
- StylusButtonEventArgs.cs
- XhtmlBasicSelectionListAdapter.cs
- XamlLoadErrorInfo.cs
- itemelement.cs
- XmlComment.cs
- NegotiateStream.cs
- UndoManager.cs
- CodeArrayCreateExpression.cs
- UniqueConstraint.cs
- DataContractJsonSerializerOperationBehavior.cs
- Timer.cs
- WpfKnownType.cs
- ProxyWebPartManager.cs
- WindowsGrip.cs
- RsaSecurityKey.cs
- PriorityQueue.cs
- FormParameter.cs
- MimeReturn.cs
- EdmSchemaAttribute.cs
- RenderData.cs
- TdsParserHelperClasses.cs
- PrintDocument.cs
- brushes.cs
- Vars.cs
- PointCollectionValueSerializer.cs
- SecurityProtocolCorrelationState.cs
- ConfigurationLocation.cs
- OleDbException.cs
- EventPropertyMap.cs
- HandoffBehavior.cs
- ObjectViewFactory.cs
- PageThemeCodeDomTreeGenerator.cs
- DataServiceHost.cs
- DodSequenceMerge.cs
- ClonableStack.cs
- TemporaryBitmapFile.cs
- WaitHandleCannotBeOpenedException.cs
- DockEditor.cs
- FontStretches.cs
- FusionWrap.cs
- AlternateViewCollection.cs
- BulletDecorator.cs
- Cursor.cs
- DesignerProperties.cs
- XmlSiteMapProvider.cs
- RegisteredExpandoAttribute.cs
- TouchPoint.cs
- DbMetaDataColumnNames.cs
- TraceContextRecord.cs
- Image.cs
- DBCSCodePageEncoding.cs
- WebBrowserUriTypeConverter.cs
- PhysicalOps.cs
- SymLanguageType.cs
- ReservationNotFoundException.cs
- MgmtResManager.cs
- ChannelBinding.cs
- TraceRecords.cs
- IgnoreFileBuildProvider.cs
- TreeSet.cs