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


C# XmlDbRow.GetString方法代码示例

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


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

示例1: ScoringStage

        public ScoringStage(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "Scoring", Name))
            {
                mScoring = row.GetString("Scoring");
                if (string.IsNullOrEmpty(mScoring))
                {
                    BooterLogger.AddError(Name + " Empty Scoring");
                }
                else if (ScoringLookup.GetScoring(mScoring) == null)
                {
                    BooterLogger.AddError(Name + " Invalid Scoring: " + mScoring);
                }
            }

            if (row.GetString("Minimum") == "Strength")
            {
                mMinimum = int.MinValue;
            }
            else
            {
                mMinimum = row.GetInt("Minimum", int.MinValue);
            }

            mMinMutation = row.GetString("MinMutation");
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:27,代码来源:ScoringStage.cs

示例2: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            TagStaticData data = new TagStaticData();

            string name = row.GetString("TypeName");
            string icon = row.GetString("Icon");
            string color = row.GetString("ColorHEX");
            bool business = row.GetBool("isBusinessType");            

            try
            {
                data.SetGUID(name);
            }
            catch (ArgumentException e)
            {
                Common.Exception("", e);
            }

            if (!data.Valid)
            {
                return;
            }

            data.name = name;
            data.icon = icon;
            data.isBusinessType = business;
            data.SetColorHex(color);

            if (!Tagger.staticData.ContainsKey(data.GUID))
            {                
                Tagger.staticData.Add(data.GUID, data);
                EnumInjection.InjectEnums<CommercialLotSubType>(new string[] { name }, new object[] { data.GUID }, false);
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:LotTypeBooter.cs

示例3: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            BooterHelper.DataBootFile careerFile = new BooterHelper.DataBootFile(file.ToString(), row.GetString("Careers"), false);
            if (!careerFile.IsValid)
            {
                BooterLogger.AddError(file.ToString() + ": Unknown Careers File " + row.GetString("Careers"));
                return;
            }

            BooterHelper.DataBootFile careerEventsFile = new BooterHelper.DataBootFile(careerFile.ToString(), row.GetString("CareerEvents"), false);

            if (careerEventsFile.IsValid)
            {
                foreach (Career career in CareerManager.CareerList)
                {
                    XmlDbTable table3 = careerEventsFile.GetTable(career.Guid.ToString ());
                    if (table3 != null)
                    {
                        LoadCareerEvents(career, careerEventsFile, table3);
                    }
                }
            }

            BooterHelper.DataBootTable table = new BooterHelper.DataBootTable(careerFile, "CareerList");
            if (!table.IsValid)
            {
                BooterLogger.AddError(file.ToString() + ": No CareerList " + careerFile.ToString());
                return;
            }

            table.Load(new CareerLoader(careerEventsFile).LoadCareer);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:32,代码来源:CareersBooter.cs

示例4: MoodletSymptom

        public MoodletSymptom(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "BuffName", Guid))
            {
                if (!row.TryGetEnum<BuffNames>("BuffName", out mBuff, BuffNames.Undefined))
                {
                    mBuff = (BuffNames)row.GetUlong("BuffName", 0);
                    if (mBuff == 0)
                    {
                        mBuff = (BuffNames)ResourceUtils.HashString64(row.GetString("BuffName"));
                    }

                    if (!BuffManager.BuffDictionary.ContainsKey((ulong)mBuff))
                    {
                        BooterLogger.AddError(Guid + " Unknown BuffName: " + row.GetString("BuffName"));
                    }
                }
            }

            mMoodValue = row.GetInt("MoodValue", 0);

            mDuration = row.GetInt("Duration", 30);
            if (mDuration <= 0)
            {
                mDuration = -1;
            }

            mOrigin = (Origin)row.GetUlong("Origin", 0);
            if (mOrigin == Origin.None)
            {
                mOrigin = (Origin)ResourceUtils.HashString64(row.GetString("Origin"));
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:MoodletSymptom.cs

示例5: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            string toneName = row.GetString("ToneName");
            if (string.IsNullOrEmpty(toneName)) 
            {
                BooterLogger.AddError("Tone found with no name");
                return;
            }

            Type classType = row.GetClassType("FullClassName");
            if (classType == null) 
            {
                BooterLogger.AddError("Tone: " + toneName + " FullClassName no match");
                return;
            }

            string guid = row.GetString("CareerGuid");

            OccupationNames careerGuid = OccupationNames.Undefined;
            ParserFunctions.TryParseEnum<OccupationNames>(guid, out careerGuid, OccupationNames.Undefined);

            if (careerGuid == OccupationNames.Undefined)
            {
                careerGuid = unchecked((OccupationNames)ResourceUtils.HashString64(guid));
            }

            Career staticCareer = CareerManager.GetStaticCareer (careerGuid);
            if (staticCareer == null)
            {
                BooterLogger.AddError("Tone: " + toneName + " CareerGuid no match");
                return;
            }

            staticCareer.SharedData.ToneDefinitions.Add(new CareerBooterToneDefinition(row, classType));
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:35,代码来源:ToneBooter.cs

示例6: Parse

        public override bool Parse(XmlDbRow row, SimPersonality personality, ref string error)
        {
            if (!base.Parse(row, personality, ref error)) return false;

            if (!row.Exists("Name"))
            {
                error = "Name missing";
                return false;
            }
            else if (!row.Exists("Default"))
            {
                error = "Default missing";
                return false;
            }
            else
            {
                CASAgeGenderFlags ageGender;
                if (!ParserFunctions.TryParseEnum<CASAgeGenderFlags>(row.GetString("AgeGender"), out ageGender, CASAgeGenderFlags.None))
                {
                    error = "Unknown AgeGender " + row.GetString("AgeGender");
                    return false;
                }

                mAge = ageGender & CASAgeGenderFlags.AgeMask;

                if (mAge == CASAgeGenderFlags.None)
                {
                    mAge = CASAgeGenderFlags.AgeMask;
                }

                mGender = ageGender & CASAgeGenderFlags.GenderMask;

                if (mGender == CASAgeGenderFlags.None)
                {
                    mGender = CASAgeGenderFlags.GenderMask;
                }

                StringToSpeciesList converter = new StringToSpeciesList();
                mSpecies = converter.Convert(row.GetString("Species"));
                if (mSpecies == null)
                {
                    error = converter.mError;
                    return false;
                }

                if (mSpecies.Count == 0)
                {
                    mSpecies.Add(CASAgeGenderFlags.Human);
                }
            }

            mName = row.GetString("Name");

            SetValue (row.GetBool("Default"));

            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:57,代码来源:AgeGenderOption.cs

示例7: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            BooterHelper.DataBootFile dataFile = file as BooterHelper.DataBootFile;
            if (dataFile == null) return;

            mIndex++;

            string personalityName = row.GetString("Name");
            if (string.IsNullOrEmpty(personalityName))
            {
                BooterLogger.AddError(file + " : Method " + mIndex + " Unnamed");
                return;
            }

            BooterLogger.AddTrace("Found " + personalityName);

            if (GetPersonality(personalityName) != null)
            {
                BooterLogger.AddError(personalityName + " Name already in use");
                return;
            }

            Type classType = row.GetClassType("FullClassName");
            if (classType == null) 
            {
                BooterLogger.AddError(personalityName + " No Class");
                return;
            }

            SimPersonality personality = null;
            try
            {
                personality = classType.GetConstructor(new Type[0]).Invoke(new object[0]) as SimPersonality;
            }
            catch
            { }

            if (personality == null)
            {
                BooterLogger.AddError(personalityName + ": Constructor Fail " + row.GetString("FullClassName"));
            }
            else
            {
                XmlDbTable optionTable = dataFile.GetTable(personalityName);
                if (personality.Parse(row, optionTable))
                {
                    sLookup.Add(personalityName.ToLower(), personality);
                }
                else
                {
                    BooterLogger.AddError(personalityName + ": Parsing Fail");
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:54,代码来源:PersonalityLookup.cs

示例8: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            Type type = row.GetClassType("Type");
            if (type == null)
            {
                BooterLogger.AddError("Invalid Type: " + row.GetString("Type"));
                return;
            }

            sData.Add(type, true);

            BooterLogger.AddTrace(" Discount Type: " + row.GetString("Type"));
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:HomemakerDiscountObjectsBooter.cs

示例9: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            BuffNames buff;
            if (!ParserFunctions.TryParseEnum<BuffNames>(row.GetString("Moodlet"), out buff, BuffNames.Undefined))
            {
                BooterLogger.AddError("Invalid Moodlet: " + row.GetString("Moodlet"));
                return;
            }

            sData.Add(buff, true);

            BooterLogger.AddTrace(" Good Lot Moodlet: " + row.GetString("Moodlet"));
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:HomemakerGoodLotMoodletBooter.cs

示例10: HitMissStage

        public HitMissStage(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "SuccessStage", Name))
            {
                mSuccessStage.First = row.GetString("SuccessStage");
            }

            if (BooterLogger.Exists(row, "FailureStage", Name))
            {
                mFailureStage.First = row.GetString("FailureStage");
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:HitMissStage.cs

示例11: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            SkillNames skill;
            if (!ParserFunctions.TryParseEnum<SkillNames>(row.GetString("Skill"), out skill, SkillNames.None))
            {
                BooterLogger.AddError("Invalid Skill: " + row.GetString("Skill"));
                return;
            }

            sData.Add(skill, true);

            BooterLogger.AddTrace(" Child Skill: " + row.GetString("Skill"));
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:13,代码来源:HomemakerChildSkillBooter.cs

示例12: CareerTransfer

        public CareerTransfer(XmlDbRow row, Dictionary<string, Dictionary<int, CareerLevel>> careerLevels, string careerName)
            : base(row, careerLevels, null)
        {
            mStringKey = "NRaas.CareerTransfer:" + row.GetString("EventType");

            if (row.Exists("TransferCareer"))
            {
                string guid = row.GetString("TransferCareer");

                ParserFunctions.TryParseEnum<OccupationNames>(guid, out mTransferCareer, OccupationNames.Undefined);

                if (mTransferCareer == OccupationNames.Undefined)
                {
                    mTransferCareer = unchecked((OccupationNames)ResourceUtils.HashString64(guid));
                }
            }

            if (row.Exists("TransferBranch"))
            {
                mTransferBranch = row.GetString("TransferBranch");
            }

            if (row.Exists("TransferLevelAbsolute"))
            {
                mAbsoluteLevel = row.GetInt("TransferLevelAbsolute");
            }

            if (row.Exists("TransferLevelRelative"))
            {
                string relativeLevel = row.GetString("TransferLevelRelative");

                List<string> relativeLevels = new List<string>(relativeLevel.Split(new char[] { ':' }));
                
                mRelativeLevelMin = int.Parse(relativeLevels[0]);
                if (relativeLevels.Count > 1)
                {
                    mRelativeLevelMax = int.Parse(relativeLevels[1]);
                }
                else
                {
                    if (mRelativeLevelMin > 0)
                    {
                        mRelativeLevelMax = mRelativeLevelMin;
                        mRelativeLevelMin = 0;
                    }
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:48,代码来源:CareerTransfer.cs

示例13: Perform

        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            string worldName = row.GetString("WorldName");
            if (string.IsNullOrEmpty(worldName)) return;

            worldName = worldName.ToLower().Replace(".world", "").Replace(".World", "").Replace(".WORLD","");

            if (sLoadedNames.ContainsKey(worldName)) return;

            string fileName = row.GetString("FileName");
            if (string.IsNullOrEmpty(fileName)) return;

            fileName = fileName.Replace(".nhd", "").Replace(".Nhd", "").Replace(".NHD", "");

            sLoadedNames.Add(worldName, fileName);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:16,代码来源:FileNameBooter.cs

示例14: OccultSymptom

        public OccultSymptom(XmlDbRow row)
            : base(row)
        {
            if (BooterLogger.Exists(row, "Occult", Guid))
            {
                if (!row.TryGetEnum<OccultTypes>("Occult", out mOccult, OccultTypes.None))
                {
                    BooterLogger.AddError(" Unknown Occult: " + row.GetString("Occult"));
                }
            }

            if (BooterLogger.Exists(row, "Remove", Guid))
            {
                mRemove = row.GetBool("Remove");
            }

            if (BooterLogger.Exists(row, "DropOthers", Guid))
            {
                mDropOthers = row.GetBool("DropOthers");
            }

            if (BooterLogger.Exists(row, "AllowIfOthers", Guid))
            {
                mAllowIfOthers = row.GetBool("AllowIfOthers");
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:26,代码来源:OccultSymptom.cs

示例15: TestSettingStage

 public TestSettingStage(XmlDbRow row)
     : base(row)
 {
     if (BooterLogger.Exists(row, "Setting", Name))
     {
         mSetting = row.GetString("Setting");
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:8,代码来源:TestSettingStage.cs


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