示例#1
0
        public object GetPropertyDynamicParameters(string path, Collection <string> providerSpecificPickList)
        {
            DynamicParameterBuilder dynamic = new DynamicParameterBuilder();

            dynamic.AddSwitchParam("Raw");

            return(dynamic.GetDictionary());
        }
示例#2
0
        public object SetPropertyDynamicParameters(string path, PSObject propertyValue)
        {
            DynamicParameterBuilder dynamic = new DynamicParameterBuilder();

            dynamic.AddSwitchParam("Add");
            dynamic.AddSwitchParam("Raw");
            dynamic.AddSwitchParam("Remove");

            return(dynamic.GetDictionary());
        }
示例#3
0
        public AssemblyCacheProvider()
        {
            var dynamic = new DynamicParameterBuilder();
            dynamic.AddParam<Version>("Version", false, null);
            dynamic.AddParam<ProcessorArchitecture>("ProcessorArchitecture", false, null);
            dynamic.AddParam<CultureInfo>("CultureInfo", false, null);
            dynamic.AddSwitchParam("Refresh");

            _sharedDynamicParameters = dynamic.GetDictionary();

            _iiDynamicParameters = GetInvokeItemDynamicParameters();
        }
        public AssemblyCacheProvider()
        {
            var dynamic = new DynamicParameterBuilder();

            dynamic.AddParam <Version>("Version", false, null);
            dynamic.AddParam <ProcessorArchitecture>("ProcessorArchitecture", false, null);
            dynamic.AddParam <CultureInfo>("CultureInfo", false, null);
            dynamic.AddSwitchParam("Refresh");

            _sharedDynamicParameters = dynamic.GetDictionary();

            _iiDynamicParameters = GetInvokeItemDynamicParameters();
        }
        private RuntimeDefinedParameterDictionary GetInvokeItemDynamicParameters()
        {
            var iiDynamicParameters = new RuntimeDefinedParameterDictionary();

            // copy shared parameters to ii dynamic parameters
            foreach (string key in _sharedDynamicParameters.Keys)
            {
                iiDynamicParameters.Add(key, _sharedDynamicParameters[key]);
            }

            // add an invoke-item specific dynamic parameter for reflection-only loading
            var dynamic = new DynamicParameterBuilder();

            dynamic.AddParam <SwitchParameter>(REFLECTION_ONLY, false, null);

            iiDynamicParameters.Add(REFLECTION_ONLY, dynamic.GetDictionary()[REFLECTION_ONLY]);

            return(iiDynamicParameters);
        }
示例#6
0
        public object SetPropertyDynamicParameters(string path, PSObject propertyValue)
        {
            DynamicParameterBuilder dynamic = new DynamicParameterBuilder();
            dynamic.AddSwitchParam("Add");
            dynamic.AddSwitchParam("Raw");
            dynamic.AddSwitchParam("Remove");

            return dynamic.GetDictionary();
        }
示例#7
0
        public object GetPropertyDynamicParameters(string path, Collection<string> providerSpecificPickList)
        {
            DynamicParameterBuilder dynamic = new DynamicParameterBuilder();
            dynamic.AddSwitchParam("Raw");

            return dynamic.GetDictionary();
        }
示例#8
0
        private RuntimeDefinedParameterDictionary GetInvokeItemDynamicParameters()
        {
            var iiDynamicParameters = new RuntimeDefinedParameterDictionary();

            // copy shared parameters to ii dynamic parameters
            foreach (string key in _sharedDynamicParameters.Keys)
            {
                iiDynamicParameters.Add(key, _sharedDynamicParameters[key]);
            }

            // add an invoke-item specific dynamic parameter for reflection-only loading
            var dynamic = new DynamicParameterBuilder();
            dynamic.AddParam<SwitchParameter>(REFLECTION_ONLY, false, null);

            iiDynamicParameters.Add(REFLECTION_ONLY, dynamic.GetDictionary()[REFLECTION_ONLY]);

            return iiDynamicParameters;
        }