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


C# IParameters类代码示例

本文整理汇总了C#中IParameters的典型用法代码示例。如果您正苦于以下问题:C# IParameters类的具体用法?C# IParameters怎么用?C# IParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: TagOperation

 public TagOperation(string outKey, string tag, IParameters parameters, bool decode, bool encode)
     : base(string.Empty, outKey) {
     _tag = tag;
     _parameters = parameters;
     _decode = decode;
     _encode = encode;
 }
开发者ID:modulexcite,项目名称:Transformalize,代码行数:7,代码来源:TagOperation.cs

示例2: CanHandle

        /// <summary>
        /// Identify this class as one that handles Blob parameters
        /// </summary>
        /// <param name="parameters">List of parameters</param>
        /// <returns>True if this class handles the specified parameters</returns>
        public bool CanHandle(IParameters parameters)
        {
            if (parameters == null)
                throw new ArgumentNullException(nameof(parameters));

            return parameters.MethodType == MethodType.Blob;
        }
开发者ID:gsteinbacher,项目名称:RandomOrgSharp,代码行数:12,代码来源:BlobJsonRequestBuilder.cs

示例3: AverageOperation

 public AverageOperation(string outKey, string outType, IParameters parameters)
     : base(string.Empty, outKey) {
     _outType = outType;
     _parameters = parameters;
     _typeSafe = parameters.ToEnumerable().All(kv => kv.Value.SimpleType.Equals(outType));
     Name = string.Format("Average ({0})", outKey);
 }
开发者ID:modulexcite,项目名称:Transformalize,代码行数:7,代码来源:AverageOperation.cs

示例4: RealTargets

        public static object RealTargets(IParameters buildParameters)
        {
            var version = buildParameters.Required<string>("version");

            var git = new GitCheckout {
                Repository = "git://github.com/refractalize/bounce.git",
                Directory = "tmp2",
            };
            var solution = new VisualStudioSolution {
                SolutionPath = "Bounce.sln",
            };
            var frameworkProject = solution.Projects["Bounce.Framework"];

            var downloadsDir = new CleanDirectory {
                Path = "Downloads",
            };

            var frameworkZip = new ZipFile {
                Directory = frameworkProject.WhenBuilt(() => Path.GetDirectoryName(frameworkProject.OutputFile.Value)),
                ZipFileName = downloadsDir.Files[version.WhenBuilt(() => string.Format("Bounce.Framework.{0}.zip", version.Value))],
            };

            var downloads = new All(frameworkZip, new GitTag {Directory = ".", Tag = version.WhenBuilt(() => "v" + version.Value)});

            return new {
                Tests = new NUnitTests {
                    DllPaths = solution.Projects.Select(p => p.OutputFile),
                },
                Downloads = downloads,
            };
        }
开发者ID:svoruganti,项目名称:bounce,代码行数:31,代码来源:BuildTargets.cs

示例5: Do

        /// <summary>
        ///     Generate the scripts.
        /// </summary>
        internal static bool Do()
        {
            _log = Program.GetInstance<IBLogger>();
            _params = Program.GetInstance<IParameters>();

            var frmConn = (NpgsqlConnection) _params[Constants.PgConnection];
            PostgresSchemaTables.CreateTables();

            var tblDict = ((Dictionary<string, DataTable>) _params[Constants.PgTables]);
            var schemaTable = tblDict[Constants.PgSchemaTable];

            if (schemaTable.Rows.Count == 0)
            {
                _log.Write('E', Constants.LogTsType, "There are no records to be processed.");
                return false;
            }

            GenerateSchemaScript(schemaTable);

            var typeTable = tblDict[Constants.PgTypeTable];
            var seqTable = tblDict[Constants.PgSeqTable];
            var fkTable = tblDict[Constants.PgFkTable];

            GenerateTableScripts(schemaTable, seqTable, frmConn);
            GenerateBuildIndexes(frmConn);
            GenerateFkConstraints(fkTable);

            if (typeTable.Rows.Count > 0 || seqTable.Rows.Count > 0)
                GenerateTypeScripts(typeTable, seqTable);

            return true;
        }
开发者ID:mvrolijk,项目名称:ConvertPG2SS,代码行数:35,代码来源:ProcessPgSchema.cs

示例6: MSBuild

 /// <summary>
 /// Constructs the MSBuild runner
 /// </summary>
 /// <param name="parameters">User defined parameters for bari</param>
 public MSBuild(IParameters parameters)
     : base("msbuild40", 
            Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), @"Microsoft.NET\Framework\v4.0.30319\"), 
            "MSBuild.exe", new Uri("http://www.microsoft.com/en-us/download/details.aspx?id=17851"))
 {
     this.parameters = parameters;
 }
开发者ID:zvrana,项目名称:bari,代码行数:11,代码来源:MSBuild.cs

示例7: LoadParameters

        //---------------------------------------------------------------------
        
        public override void LoadParameters(string dataFile,
                                            ICore mCore)
        {
            modelCore = mCore;

            // Add local event handler for cohorts death due to age-only
            // disturbances.
            Cohort.AgeOnlyDeathEvent += CohortKilledByAgeOnlyDisturbance;

            HarvestMgmtLib.Main.InitializeLib(modelCore);
            HarvestExtensionMain.SiteHarvestedEvent += SiteHarvested;
            Landis.Library.BiomassHarvest.Main.InitializeLib(modelCore);

            ParametersParser parser = new ParametersParser(modelCore.Species);

            HarvestMgmtLib.IInputParameters baseParameters = Landis.Data.Load<IInputParameters>(dataFile, parser);
            parameters = baseParameters as IParameters;
            if (parser.RoundedRepeatIntervals.Count > 0)
            {
                ModelCore.UI.WriteLine("NOTE: The following repeat intervals were rounded up to");
                ModelCore.UI.WriteLine("      ensure they were multiples of the harvest timestep:");
                ModelCore.UI.WriteLine("      File: {0}", dataFile);
                foreach (RoundedInterval interval in parser.RoundedRepeatIntervals)
                    ModelCore.UI.WriteLine("      At line {0}, the interval {1} rounded up to {2}",
                                 interval.LineNumber,
                                 interval.Original,
                                 interval.Adjusted);
            }

        }
开发者ID:pjbitterman,项目名称:Extensions-Disturbance,代码行数:32,代码来源:PlugIn.cs

示例8: Initialize

        //private static StreamWriter log;
        //---------------------------------------------------------------------
        public static void Initialize(IParameters parameters)
        {
            FuncType            = parameters.SppFunctionalType;
            NTolerance          = parameters.NTolerance;
            GDDmin              = parameters.GDDmin;
            GDDmax              = parameters.GDDmax;
            MinJanTemp          = parameters.MinJanTemp;
            MaxDrought          = parameters.MaxDrought;
            LeafLongevity       = parameters.LeafLongevity;
            Epicormic           = parameters.Epicormic;
            LeafLignin          = parameters.LeafLignin;
            WoodLignin          = parameters.WoodLignin ;
            CoarseRootLignin    = parameters.CoarseRootLignin ;
            FineRootLignin      = parameters.FineRootLignin ;
            LeafCN              = parameters.LeafCN;
            WoodCN              = parameters.WoodCN;
            CoarseRootCN        = parameters.CoarseRootCN;
            LeafLitterCN        = parameters.FoliageLitterCN;
            FineRootLitterCN    = parameters.FineRootLitterCN;
            NLimits = new Species.AuxParm<double>(Model.Core.Species);

            Establishment.Initialize();

            // The initial set of establishment probabilities:
            EstablishProbability = Establishment.GenerateNewEstablishProbabilities(parameters.Timestep);
            Reproduction.ChangeEstablishProbabilities(Util.ToArray<double>(SpeciesData.EstablishProbability));

            ChangeParameters(parameters);
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Succession,代码行数:31,代码来源:SpeciesData.cs

示例9: GetTargets

        public static object GetTargets(IParameters parameters)
        {
            var git = new GitCheckout {
                Repository = @"C:\Users\Public\Documents\Development\BigSolution.git",
                Directory = "one"
            };
            var solution = new VisualStudioSolution {
                SolutionPath = git.Files["BigSolution.sln"]
            };
            var webProject = solution.Projects[parameters.Default("proj", "BigSolution")];
            var serviceName = parameters.Default("svc", "BigWindowsService");
            var service = solution.Projects[serviceName];

            return new {
                WebSite = new Iis7WebSite {
                    Directory = webProject.ProjectDirectory,
                    Name = "BigWebSite",
                    Port = 5001
                },
                Tests = new NUnitTests {
                    DllPaths = solution.Projects.Select(p => p.OutputFile)
                },
                Service = new WindowsService {
                    BinaryPath = service.OutputFile,
                    Name = serviceName,
                    DisplayName = "Big Windows Service",
                    Description = "a big windows service demonstrating the bounce build framework"
                },
                Zip = new ZipFile {
                    Directory = webProject.WhenBuilt(() => Path.GetDirectoryName(webProject.OutputFile.Value)),
                    ZipFileName = "web.zip"
                },
            };
        }
开发者ID:svoruganti,项目名称:bounce,代码行数:34,代码来源:BuildTargets.cs

示例10: XBuild

 /// <summary>
 /// Constructs the MSBuild runner
 /// </summary>
 /// <param name="parameters">User defined parameters for bari</param>
 public XBuild(IParameters parameters)
     : base("xbuild", 
            "",
            "xbuild.bat", new Uri("http://www.go-mono.com/mono-downloads/download.html"))
 {
     this.parameters = parameters;
 }
开发者ID:zvrana,项目名称:bari,代码行数:11,代码来源:XBuild.cs

示例11: Parameters

		//---------------------------------------------------------------------

		public Parameters(IParameters parameters)
		{
			name        = parameters.Name;
			description = parameters.Description;
			mapCode     = parameters.MapCode;
			active      = parameters.Active;
		}
开发者ID:LANDIS-II-Foundation,项目名称:Libraries,代码行数:9,代码来源:Parameters.cs

示例12: MailOperation

        public MailOperation(MailConnection connection, IParameters parameters)
            : base(string.Empty, string.Empty) {
            _connection = connection;
            _parameters = parameters;
            
            _hasCc = parameters.ContainsName("cc");
            _ccKey = _hasCc ? parameters.GetKeyByName("cc") : string.Empty;

            _hasBcc = parameters.ContainsName("bcc");
            _bccKey = _hasBcc ? parameters.GetKeyByName("bcc") : string.Empty;

            _hasSubject = parameters.ContainsName("subject");
            _subjectKey = _hasSubject ? parameters.GetKeyByName("subject") : string.Empty;

            if (!parameters.ContainsName("from")) {
                throw new TransformalizeException(Logger, EntityName, "Mail transform requires parameter named from.");
            }
            _fromKey = parameters.GetKeyByName("from");

            if (!parameters.ContainsName("to")) {
                throw new TransformalizeException(Logger, EntityName, "Mail transform requires parameter named to.");
            }
            _toKey = parameters.GetKeyByName("to");

            if (!parameters.ContainsName("body")) {
                throw new TransformalizeException(Logger, EntityName, "Mail transform requires parameter named body.");
            }
            _bodyKey = parameters.GetKeyByName("body");

            Name = "Mail";
        }
开发者ID:modulexcite,项目名称:Transformalize,代码行数:31,代码来源:MailOperation.cs

示例13: Initialize

        //---------------------------------------------------------------------
        public static void Initialize(IParameters parameters)
        {
            string logFileName   = "Century-succession-log.csv";
            UI.WriteLine("   Opening Century-succession log file \"{0}\" ...", logFileName);
            try {
                log = Data.CreateTextFile(logFileName);
            }
            catch (Exception err) {
                string mesg = string.Format("{0}", err.Message);
                throw new System.ApplicationException(mesg);
            }

            log.AutoFlush = true;
            log.Write("Time, Ecoregion, NumSites,");
            log.Write("NEEC, SOMTC, AGB, ");
            log.Write("AG_NPPC, BG_NPPC, LitterfallC, FRootLitterC, ");
            log.Write("MineralN, TotalN, GrossMineralization, ");
            log.Write("C:LeafFRoot, C:WoodCRoot, C:DeadWood, C:DeadCRoot, ");
            log.Write("C:SurfStruc, C:SurfMeta, C:SoilStruc, C:SoilMeta, ");
            log.Write("C:SOM1surf, C:SOM1soil, C:SOM2, C:SOM3, ");
            log.Write("N:CohortLeaf, N:CohortWood, N:DeadWood, N:DeadRoot, ");
            log.Write("N:SurfStruc, N:SurfMeta, N:SoilStruc, N:SoilMeta, ");
            log.Write("N:SOM1surf, N:SOM1soil, N:SOM2, N:SOM3, ");
            log.Write("SurfStrucNetMin, SurfMetaNetMin, SoilStrucNetMin, SoilMetaNetMin, ");
            log.Write("SOM1surfNetMin, SOM1soilNetMin, SOM2NetMin, SOM3NetMin, ");
            log.Write("StreamC, StreamN, FireEfflux");
            log.WriteLine("");
        }
开发者ID:LANDIS-II-Foundation,项目名称:Extensions-Succession,代码行数:29,代码来源:Outputs.cs

示例14: DefaultSuiteFactory

        public DefaultSuiteFactory(IParameters parameters, [SuiteRoot] IFileSystemDirectory suiteRoot, ICommandEnumerator commandEnumerator)
        {
            targetGoal = parameters.Goal;
            this.suiteRoot = suiteRoot;

            ignoreTargetGoal = !commandEnumerator.NeedsExplicitTargetGoal(parameters.Command);
        }
开发者ID:vigoo,项目名称:bari,代码行数:7,代码来源:DefaultSuiteFactory.cs

示例15: Initialize

        //---------------------------------------------------------------------
        public static void Initialize(IParameters parameters)
        {
            MinRelativeBiomass  = parameters.MinRelativeBiomass;
            B_MAX               = new Ecoregions.AuxParm<int>(Model.Core.Ecoregions);

            ChangeParameters(parameters);
        }
开发者ID:YongLuo007,项目名称:Extensions-Succession,代码行数:8,代码来源:EcoregionData.cs


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