WorkflowServiceAttributesTypeConverter.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / WorkflowServiceAttributesTypeConverter.cs / 1305376 / WorkflowServiceAttributesTypeConverter.cs

                            //------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------

namespace System.Workflow.Activities 
{
    using System.ComponentModel; 
 
    class WorkflowServiceAttributesTypeConverter : TypeConverter
    { 

        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
        {
            // TypeDescriptor.GetProperties is used here to get the sub properties of the property that we want to be able 
            // to be expandable in the property browser
            PropertyDescriptorCollection subProperties = TypeDescriptor.GetProperties(value, new Attribute[] { new BrowsableAttribute(true) }); 
            return subProperties; 
        }
        public override bool GetPropertiesSupported(ITypeDescriptorContext context) 
        {
            // This is to make the property expandable into sub properties int he property browser
            return true;
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK