本文整理汇总了C#中SettingsStorage.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# SettingsStorage.GetValue方法的具体用法?C# SettingsStorage.GetValue怎么用?C# SettingsStorage.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SettingsStorage
的用法示例。
在下文中一共展示了SettingsStorage.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
void IPersistable.Load(SettingsStorage storage)
{
Address = storage.GetValue<EndPoint>(nameof(Address));
Login = storage.GetValue<string>(nameof(Login));
Password = storage.GetValue<string>(nameof(Password));
Type = storage.GetValue<ProxyTypes>(nameof(Type));
}
示例2: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
Login = storage.GetValue<string>("Login");
Password = storage.GetValue<SecureString>("Password");
}
示例3: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
Address = storage.GetValue<Uri>("Address");
CustomDateFormat = storage.GetValue<string>("CustomDateFormat");
}
示例4: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public void Load(SettingsStorage storage)
{
Rules.AddRange(storage.GetValue<IList<AlertRule>>("Rules"));
AlertType = storage.GetValue<string>("AlertType").To<AlertTypes?>();
Caption = storage.GetValue<string>("Caption");
Message = storage.GetValue<string>("Message");
}
示例5: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
Key = storage.GetValue<SecureString>("Key");
Secret = storage.GetValue<SecureString>("Secret");
}
示例6: Load
public override void Load(SettingsStorage storage)
{
var panelSettings = storage.GetValue<SettingsStorage>("PositionsPanel");
if (panelSettings != null)
((IPersistable)PositionsPanel).Load(panelSettings);
var alertSettings = storage.GetValue<SettingsStorage>("AlertSettings");
if (alertSettings != null)
AlertBtn.Load(alertSettings);
}
示例7: Load
public override void Load(SettingsStorage storage)
{
base.Load(storage);
SubscribeNews = storage.GetValue("SubscribeNews", false);
NewsGrid.Load(storage.GetValue<SettingsStorage>("NewsGrid"));
var alertSettings = storage.GetValue<SettingsStorage>("AlertSettings");
if (alertSettings != null)
AlertBtn.Load(alertSettings);
}
示例8: Load
/// <summary>
/// Загрузить настройки.
/// </summary>
/// <param name="storage">Хранилище настроек.</param>
public override void Load(SettingsStorage storage)
{
base.Load(storage);
var portfolio = storage.GetValue<string>("Portfolio");
if (!portfolio.IsEmpty())
Portfolio = ConfigManager.GetService<StrategyConnector>().LookupPortfolio(portfolio);
var security = storage.GetValue<string>("Security");
if (!security.IsEmpty())
Security = ConfigManager.GetService<StrategyConnector>().LookupById(security);
}
示例9: Load
public override void Load(SettingsStorage storage)
{
base.Load(storage);
SubscribeNews = storage.GetValue("SubscribeNews", false);
NewsGrid.NewsProvider = ConfigManager.GetService<INewsProvider>();
NewsGrid.Load(storage.GetValue<SettingsStorage>("NewsGrid"));
var alertSettings = storage.GetValue<SettingsStorage>("AlertSettings");
if (alertSettings != null)
AlertBtn.Load(alertSettings);
}
示例10: Load
public override void Load(SettingsStorage storage)
{
var compositionId = storage.GetValue<Guid>("CompositionId");
var registry = ConfigManager.GetService<StrategiesRegistry>();
var composition = (CompositionDiagramElement)registry.Strategies.FirstOrDefault(c => c.TypeId == compositionId);
Composition = registry.Clone(composition);
Id = storage.GetValue<Guid>("StrategyId");
var emulationSettings = storage.GetValue<SettingsStorage>("EmulationSettings");
if (emulationSettings != null)
EmulationSettings.Load(emulationSettings);
base.Load(storage);
}
示例11: Load
public void Load(SettingsStorage storage)
{
var settings = storage
.GetValue<IEnumerable<SettingsStorage>>("Settings", new SettingsStorage[0])
.Select(s => s.Load<MarketDataSettings>());
Settings.Clear();
Settings.AddRange(settings);
}
示例12: Load
/// <summary>
/// Load settings.
/// </summary>
/// <param name="storage">Settings storage.</param>
public void Load(SettingsStorage storage)
{
if (_alertSchema == null)
return;
var alertSettings = storage.GetValue<SettingsStorage>("AlertSchema");
if (alertSettings != null)
_alertSchema.Load(alertSettings);
TryRegisterAlertSchema();
IsChecked = _alertSchema.AlertType != null;
}
示例13: Load
public override void Load(SettingsStorage storage)
{
var values = storage.GetValue<KeyValuePair<string, decimal>[]>("InnerPortfolios");
if (values != null)
{
var pairs = values
.Select(v => new KeyValuePair<Portfolio, decimal>(ConfigManager.GetService<IConnector>().Portfolios.FirstOrDefault(p => p.Name == v.Key), v.Value))
.ToArray();
InnerPortfolios.AddRange(pairs);
}
}
示例14: foreach
void IPersistable.Load(SettingsStorage storage)
{
DataType = storage.GetValue<Type>("DataType");
ExecutionType = storage.GetValue<ExecutionTypes?>("ExecutionType");
foreach (var fieldSettings in storage.GetValue<SettingsStorage[]>("Fields"))
{
var fieldName = fieldSettings.GetValue<string>("Name");
var field = _fields.FirstOrDefault(f => f.Name.CompareIgnoreCase(fieldName));
if (field != null)
field.Load(fieldSettings);
}
_settings.Load(storage.GetValue<SettingsStorage>("Settings"));
}
示例15: Load
public void Load(SettingsStorage storage)
{
Path = storage.GetValue<string>("Path");
ColumnSeparator = storage.GetValue<string>("ColumnSeparator");
//RowSeparator = storage.GetValue<string>("RowSeparator");
SkipFromHeader = storage.GetValue<int>("SkipFromHeader");
//SkipFromFooter = storage.GetValue<int>("SkipFromFooter");
Format = storage.GetValue<StorageFormats>("Format");
if (storage.ContainsKey("Drive"))
Drive = DriveCache.Instance.GetDrive(storage.GetValue<string>("Drive"));
TimeZone = TimeZoneInfo.FindSystemTimeZoneById(storage.GetValue<string>("TimeZone"));
CandleSettings = storage.GetValue("CandleSettings", CandleSettings);
}