WorkflowServiceBuildProvider.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 / ServiceModel / Activation / WorkflowServiceBuildProvider.cs / 1305376 / WorkflowServiceBuildProvider.cs

                            //------------------------------------------------------------ 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Activation
{ 
    using System.CodeDom.Compiler;
    using System.Collections; 
    using System.Diagnostics.CodeAnalysis; 
    using System.IO;
    using System.Web.Compilation; 

    [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "instantiated from config")]
    [BuildProviderAppliesTo(BuildProviderAppliesTo.All)]
    [ServiceActivationBuildProvider] 
    class WorkflowServiceBuildProvider : BuildProvider
    { 
        internal const string ruleFileExtension = ".rules"; 
        object[] virtualPathDependencies;
 
        public override ICollection VirtualPathDependencies
        {
            get
            { 
                if (this.virtualPathDependencies == null)
                { 
                    ArrayList dependencies = new ArrayList(base.VirtualPathDependencies.Count + 1); 
                    dependencies.AddRange(base.VirtualPathDependencies);
                    dependencies.Add(Path.ChangeExtension(base.VirtualPath, ruleFileExtension)); 
                    this.virtualPathDependencies = dependencies.ToArray();
                }
                return virtualPathDependencies;
            } 
        }
 
        Type ServiceHostFactoryType 
        {
            get 
            {
                return typeof(WorkflowServiceHostFactory);
            }
        } 

        //CompileStringTemplate : "__VIRTUAL_PATH__|__FACTORY_NAME__|__SERVICE_VALUE__"; 
        public override string GetCustomString(CompilerResults results) 
        {
            return (base.VirtualPath + "|" + ServiceHostFactoryType.AssemblyQualifiedName + "|" + base.VirtualPath); 
        }

        public override BuildProviderResultFlags GetResultFlags(CompilerResults results)
        { 
            return BuildProviderResultFlags.ShutdownAppDomainOnChange;
        } 
    } 
}

// 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