Beispiel #1
0
 internal FilterInfo(string name, FilterInfo other) : base(name, other)
 {
 }
Beispiel #2
0
 internal FilterInfo(FilterInfo other) : base(other)
 {
 }
Beispiel #3
0
        private static FunctionInfo CreateFunction(string name, ScriptBlock function, FunctionInfo originalFunction,
            ScopedItemOptions options, ExecutionContext context, string helpFile)
        {
            FunctionInfo newValue = null;

            if (options == ScopedItemOptions.Unspecified)
            {
                options = ScopedItemOptions.None;
            }

            // First use the copy constructors
            if (originalFunction is FilterInfo)
            {
                newValue = new FilterInfo(name, (FilterInfo)originalFunction);
            }
            else if (originalFunction is WorkflowInfo)
            {
                newValue = new WorkflowInfo(name, (WorkflowInfo)originalFunction);
            }
            else if (originalFunction is ConfigurationInfo)
            {
                newValue = new ConfigurationInfo(name, (ConfigurationInfo)originalFunction);
            }
            else if (originalFunction != null)
            {
                newValue = new FunctionInfo(name, originalFunction);
            }

            // Then use the creation constructors - workflows don't get here because the workflow info
            // is created during compilation.
            else if (function.IsFilter) { newValue = new FilterInfo(name, function, options, context, helpFile); }
            else if (function.IsConfiguration)
            {
                newValue = new ConfigurationInfo(name, function, options, context, helpFile, function.IsMetaConfiguration());
            }
            else newValue = new FunctionInfo(name, function, options, context, helpFile);

            return newValue;
        }