本文整理汇总了C#中Persistence.GetBool方法的典型用法代码示例。如果您正苦于以下问题:C# Persistence.GetBool方法的具体用法?C# Persistence.GetBool怎么用?C# Persistence.GetBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Persistence
的用法示例。
在下文中一共展示了Persistence.GetBool方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Import
public void Import(Persistence.Lookup settings)
{
mSeason = settings.GetEnum<Season>("Season", Season.Summer);
mNoSchool = settings.GetBool("NoSchool", false);
mDays = settings.GetList<Holiday>("Days");
}
示例2: Import
public void Import(Persistence.Lookup settings)
{
mName = settings.GetString("Name");
if (settings.Exists("Autonomous"))
{
mAutonomous = settings.GetBool("Autonomous", false);
mFlags |= Flags.Autonomous;
}
if (settings.Exists("UserDirected"))
{
mUserDirected = settings.GetBool("UserDirected", false);
mFlags |= Flags.UserDirected;
}
if (settings.Exists("AgeSpecies"))
{
mAgeSpecies = settings.GetEnum<CASAGSAvailabilityFlags>("AgeSpecies", CASAGSAvailabilityFlags.None);
mFlags |= Flags.AgeSpecies;
mAgeSpeciesList = null;
}
if (settings.Exists("Availability"))
{
mAvailability = settings.GetEnum<Availability.FlagField>("Availability", Availability.FlagField.None);
mFlags |= Flags.Availability;
}
if (settings.Exists("Advertised"))
{
mAdvertisedOutputs.Clear();
ParseAdvertised(settings.GetStringList("Advertised"));
}
}
示例3: Import
public void Import(Persistence.Lookup settings)
{
mName = settings.GetString("Name");
mStart = settings.GetInt("Start", 1);
mEnd = settings.GetInt("End", -1);
mEnabled = settings.GetBool("Enabled", false);
Import(ref mMorningTemp, settings, "MorningTemp");
Import(ref mNoonTemp, settings, "NoonTemp");
Import(ref mEveningTemp, settings, "EveningTemp");
Import(ref mNightTemp, settings, "NightTemp");
mData = settings.GetList<WeatherData>("Types");
}