当前位置: 首页>>代码示例>>C#>>正文


C# RuntimeDefinedParameterDictionary.Add方法代码示例

本文整理汇总了C#中RuntimeDefinedParameterDictionary.Add方法的典型用法代码示例。如果您正苦于以下问题:C# RuntimeDefinedParameterDictionary.Add方法的具体用法?C# RuntimeDefinedParameterDictionary.Add怎么用?C# RuntimeDefinedParameterDictionary.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RuntimeDefinedParameterDictionary的用法示例。


在下文中一共展示了RuntimeDefinedParameterDictionary.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateVirtualMachineOSImageGetDetailsDynamicParameters

        protected object CreateVirtualMachineOSImageGetDetailsDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pImageName = new RuntimeDefinedParameter();
            pImageName.Name = "ImageName";
            pImageName.ParameterType = typeof(System.String);
            pImageName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pImageName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ImageName", pImageName);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 2,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:docschmidt,项目名称:azure-powershell,代码行数:29,代码来源:VirtualMachineOSImageGetDetailsMethod.cs

示例2: CreateHostedServiceListExtensionsDynamicParameters

        protected object CreateHostedServiceListExtensionsDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pServiceName = new RuntimeDefinedParameter();
            pServiceName.Name = "ServiceName";
            pServiceName.ParameterType = typeof(System.String);
            pServiceName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pServiceName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ServiceName", pServiceName);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 2,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:docschmidt,项目名称:azure-powershell,代码行数:29,代码来源:HostedServiceListExtensionsMethod.cs

示例3: CreateExtensionImageRegisterDynamicParameters

        protected object CreateExtensionImageRegisterDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pParameters = new RuntimeDefinedParameter();
            pParameters.Name = "ExtensionImageRegisterParameters";
            pParameters.ParameterType = typeof(Microsoft.WindowsAzure.Management.Compute.Models.ExtensionImageRegisterParameters);
            pParameters.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pParameters.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ExtensionImageRegisterParameters", pParameters);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 2,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:docschmidt,项目名称:azure-powershell,代码行数:29,代码来源:ExtensionImageRegisterMethod.cs

示例4: CreateVirtualMachineScaleSetListDynamicParameters

        protected object CreateVirtualMachineScaleSetListDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pResourceGroupName = new RuntimeDefinedParameter();
            pResourceGroupName.Name = "ResourceGroupName";
            pResourceGroupName.ParameterType = typeof(string);
            pResourceGroupName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pResourceGroupName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ResourceGroupName", pResourceGroupName);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 2,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:29,代码来源:VirtualMachineScaleSetListMethod.cs

示例5: CreateVirtualMachineScaleSetVMListNextDynamicParameters

        protected object CreateVirtualMachineScaleSetVMListNextDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pNextPageLink = new RuntimeDefinedParameter();
            pNextPageLink.Name = "NextPageLink";
            pNextPageLink.ParameterType = typeof(string);
            pNextPageLink.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pNextPageLink.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("NextPageLink", pNextPageLink);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 2,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:29,代码来源:VirtualMachineScaleSetVMListNextMethod.cs

示例6: NewDriveDynamicParameters

 protected override object NewDriveDynamicParameters()
 {
     try{
         WriteVerbose("TmxProvider::NewDriveDynamicParameters()");
         dynamicParameters =
             new RuntimeDefinedParameterDictionary();
         var atts1 = new Collection<Attribute>();
         var parameterAttribute1 = new ParameterAttribute {Mandatory = true};
         //ParameterAttribute parameterAttribute1 = new ParameterAttribute();
         //parameterAttribute1.Mandatory = true;
         //parameterAttribute2.ParameterSetName = "WindowNameParameterSet";
         atts1.Add(parameterAttribute1);
         var attr1 = new AllowEmptyStringAttribute();
         atts1.Add(attr1);
         dynamicParameters.Add(
             "windowName", 
             new RuntimeDefinedParameter(
                 "windowName", 
                 typeof(string), 
                 atts1));
         
         var atts2 = new Collection<Attribute>();
         var parameterAttribute2 = new ParameterAttribute {Mandatory = true};
         //ParameterAttribute parameterAttribute2 = new ParameterAttribute();
         //parameterAttribute2.Mandatory = true;
         //parameterAttribute2.ParameterSetName = "ProcessNameParameterSet";
         atts2.Add(parameterAttribute2);
         var attr2 = new AllowEmptyStringAttribute();
         atts2.Add(attr2);
         dynamicParameters.Add(
             "processName", 
             new RuntimeDefinedParameter(
                 "processName", 
                 typeof(string), 
                 atts2));
         
         var atts3 = new Collection<Attribute>();
         var parameterAttribute3 = new ParameterAttribute {Mandatory = true};
         //ParameterAttribute parameterAttribute3 = new ParameterAttribute();
         //parameterAttribute3.Mandatory = true;
         //parameterAttribute3.ParameterSetName = "ProcessIdParameterSet";
         atts3.Add(parameterAttribute3);
         var attr3 = new AllowEmptyStringAttribute();
         atts3.Add(attr3);
         dynamicParameters.Add(
             "processId", 
             new RuntimeDefinedParameter(
                 "processId", 
                 typeof(int), 
                 atts3));
         
         return dynamicParameters;
     }
     catch (Exception e) {
         WriteVerbose(e.Message);
         WriteVerbose("TmxProvider::NewDriveDynamicParameters()");
         return null;
     }
 }
开发者ID:MatkoHanus,项目名称:STUPS,代码行数:59,代码来源:TMXProvider.cs

示例7: CreateExtensionImageUnregisterDynamicParameters

        protected object CreateExtensionImageUnregisterDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pProviderNamespace = new RuntimeDefinedParameter();
            pProviderNamespace.Name = "ProviderNamespace";
            pProviderNamespace.ParameterType = typeof(System.String);
            pProviderNamespace.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pProviderNamespace.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ProviderNamespace", pProviderNamespace);

            var pType = new RuntimeDefinedParameter();
            pType.Name = "Type";
            pType.ParameterType = typeof(System.String);
            pType.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pType.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("Type", pType);

            var pVersion = new RuntimeDefinedParameter();
            pVersion.Name = "Version";
            pVersion.ParameterType = typeof(System.String);
            pVersion.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 3,
                Mandatory = true
            });
            pVersion.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("Version", pVersion);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 4,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:docschmidt,项目名称:azure-powershell,代码行数:53,代码来源:ExtensionImageUnregisterMethod.cs

示例8: CreateContainerServiceCreateOrUpdateDynamicParameters

        protected object CreateContainerServiceCreateOrUpdateDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pResourceGroupName = new RuntimeDefinedParameter();
            pResourceGroupName.Name = "ResourceGroupName";
            pResourceGroupName.ParameterType = typeof(string);
            pResourceGroupName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pResourceGroupName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ResourceGroupName", pResourceGroupName);

            var pContainerServiceName = new RuntimeDefinedParameter();
            pContainerServiceName.Name = "Name";
            pContainerServiceName.ParameterType = typeof(string);
            pContainerServiceName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pContainerServiceName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("Name", pContainerServiceName);

            var pParameters = new RuntimeDefinedParameter();
            pParameters.Name = "ContainerService";
            pParameters.ParameterType = typeof(ContainerService);
            pParameters.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 3,
                Mandatory = true
            });
            pParameters.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ContainerService", pParameters);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 4,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:brnleehng,项目名称:azure-powershell,代码行数:53,代码来源:ContainerServiceCreateOrUpdateMethod.cs

示例9: CreateVirtualMachineStartRolesDynamicParameters

        protected object CreateVirtualMachineStartRolesDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pServiceName = new RuntimeDefinedParameter();
            pServiceName.Name = "ServiceName";
            pServiceName.ParameterType = typeof(System.String);
            pServiceName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pServiceName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ServiceName", pServiceName);

            var pDeploymentName = new RuntimeDefinedParameter();
            pDeploymentName.Name = "DeploymentName";
            pDeploymentName.ParameterType = typeof(System.String);
            pDeploymentName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pDeploymentName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("DeploymentName", pDeploymentName);

            var pParameters = new RuntimeDefinedParameter();
            pParameters.Name = "VirtualMachineStartRolesParameters";
            pParameters.ParameterType = typeof(Microsoft.WindowsAzure.Management.Compute.Models.VirtualMachineStartRolesParameters);
            pParameters.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 3,
                Mandatory = true
            });
            pParameters.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("VirtualMachineStartRolesParameters", pParameters);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 4,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:53,代码来源:VirtualMachineStartRolesMethod.cs

示例10: CreateVirtualMachineRestartDynamicParameters

        protected object CreateVirtualMachineRestartDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pServiceName = new RuntimeDefinedParameter();
            pServiceName.Name = "ServiceName";
            pServiceName.ParameterType = typeof(System.String);
            pServiceName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pServiceName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ServiceName", pServiceName);

            var pDeploymentName = new RuntimeDefinedParameter();
            pDeploymentName.Name = "DeploymentName";
            pDeploymentName.ParameterType = typeof(System.String);
            pDeploymentName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pDeploymentName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("DeploymentName", pDeploymentName);

            var pVirtualMachineName = new RuntimeDefinedParameter();
            pVirtualMachineName.Name = "VirtualMachineName";
            pVirtualMachineName.ParameterType = typeof(System.String);
            pVirtualMachineName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 3,
                Mandatory = true
            });
            pVirtualMachineName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("VirtualMachineName", pVirtualMachineName);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 4,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:53,代码来源:VirtualMachineRestartMethod.cs

示例11: CreateForNewItem

        public RuntimeDefinedParameterDictionary CreateForNewItem()
        {
            var parameters = new RuntimeDefinedParameterDictionary();

            var attrs = from row in _columns
                        let nullable = (bool)row["IS_NULLABLE"] 
                        let primaryKey = (bool)row["PRIMARY_KEY"]
                        let columnName = row["COLUMN_NAME"].ToString()
                        let dataType = ConvertSqliteTypeToType( row["DATA_TYPE"].ToString() )
                        select new RuntimeDefinedParameter(
                            columnName,
                            dataType,
                            new Collection<Attribute>
                                    {
                                        new ParameterAttribute()
                                            {
                                                Mandatory = ! nullable && ! primaryKey,
                                                ValueFromPipelineByPropertyName = true,                                                
                                            },
                                            
                                    }
                            );

            attrs.ToList().ForEach(attr => parameters.Add(attr.Name, attr));
            return parameters;
        }
开发者ID:nickchal,项目名称:pash,代码行数:26,代码来源:DynamicParametersFactory.cs

示例12: CreateVirtualMachineExtensionListVersionsDynamicParameters

        protected object CreateVirtualMachineExtensionListVersionsDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pPublisherName = new RuntimeDefinedParameter();
            pPublisherName.Name = "PublisherName";
            pPublisherName.ParameterType = typeof(System.String);
            pPublisherName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pPublisherName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("PublisherName", pPublisherName);

            var pExtensionName = new RuntimeDefinedParameter();
            pExtensionName.Name = "ExtensionName";
            pExtensionName.ParameterType = typeof(System.String);
            pExtensionName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pExtensionName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ExtensionName", pExtensionName);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 3,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:docschmidt,项目名称:azure-powershell,代码行数:41,代码来源:VirtualMachineExtensionListVersionsMethod.cs

示例13: CreateVirtualMachineVMImageDeleteDynamicParameters

        protected object CreateVirtualMachineVMImageDeleteDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pVMImageName = new RuntimeDefinedParameter();
            pVMImageName.Name = "VMImageName";
            pVMImageName.ParameterType = typeof(System.String);
            pVMImageName.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 1,
                Mandatory = true
            });
            pVMImageName.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("VMImageName", pVMImageName);

            var pDeleteFromStorage = new RuntimeDefinedParameter();
            pDeleteFromStorage.Name = "DeleteFromStorage";
            pDeleteFromStorage.ParameterType = typeof(System.Boolean);
            pDeleteFromStorage.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByDynamicParameters",
                Position = 2,
                Mandatory = true
            });
            pDeleteFromStorage.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("DeleteFromStorage", pDeleteFromStorage);

            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 3,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:41,代码来源:VirtualMachineVMImageDeleteMethod.cs

示例14: CreateOperatingSystemListDynamicParameters

        protected object CreateOperatingSystemListDynamicParameters()
        {
            dynamicParameters = new RuntimeDefinedParameterDictionary();
            var pArgumentList = new RuntimeDefinedParameter();
            pArgumentList.Name = "ArgumentList";
            pArgumentList.ParameterType = typeof(object[]);
            pArgumentList.Attributes.Add(new ParameterAttribute
            {
                ParameterSetName = "InvokeByStaticParameters",
                Position = 1,
                Mandatory = true
            });
            pArgumentList.Attributes.Add(new AllowNullAttribute());
            dynamicParameters.Add("ArgumentList", pArgumentList);

            return dynamicParameters;
        }
开发者ID:FrankSiegemund,项目名称:azure-powershell,代码行数:17,代码来源:OperatingSystemListMethod.cs

示例15: Create

        public object Create()
        {
            var type = _metadata.GetMappedClass(EntityMode.Poco);

            var parameters = new RuntimeDefinedParameterDictionary();

            var attrs = from prop in type.GetProperties()
                        // where prop.Name != _metadata.IdentifierPropertyName
                        select new RuntimeDefinedParameter(
                            prop.Name,
                            prop.PropertyType,
                            new Collection<Attribute>
                                    {
                                        new ParameterAttribute()
                                    }
                            );
            attrs.ToList().ForEach(attr => parameters.Add(attr.Name, attr));
            return parameters;
        }
开发者ID:beefarino,项目名称:NHibernate-QuickStart,代码行数:19,代码来源:DynamicParametersFactory.cs


注:本文中的RuntimeDefinedParameterDictionary.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。