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


C# SettingsStorage.GetValue方法代码示例

本文整理汇总了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));
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:7,代码来源:Proxy.cs

示例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");
		}
开发者ID:EricGarrison,项目名称:StockSharp,代码行数:11,代码来源:AlfaDirectMessageAdapter_Settings.cs

示例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");
		}
开发者ID:jackman0925,项目名称:StockSharp,代码行数:11,代码来源:RssMarketDataMessageAdapter_Settings.cs

示例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");
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:11,代码来源:AlertSchema.cs

示例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");
		}
开发者ID:jackman0925,项目名称:StockSharp,代码行数:11,代码来源:BtceMessageAdapter_Settings.cs

示例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);
		}
开发者ID:kknet,项目名称:StockSharp,代码行数:10,代码来源:PortfoliosPanel.xaml.cs

示例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);
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:11,代码来源:NewsPanel.xaml.cs

示例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);
		}
开发者ID:reddream,项目名称:StockSharp,代码行数:16,代码来源:DiagramStrategyEx.cs

示例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);
		}
开发者ID:kknet,项目名称:StockSharp,代码行数:13,代码来源:NewsPanel.xaml.cs

示例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);
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:16,代码来源:EmulationDiagramStrategy.cs

示例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);
		}
开发者ID:RakotVT,项目名称:StockSharp,代码行数:9,代码来源:MarketDataSettingsCache.cs

示例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;
		}
开发者ID:hbwjz,项目名称:StockSharp,代码行数:16,代码来源:AlertButton.xaml.cs

示例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);
			}
		}
开发者ID:alexandrmalov,项目名称:StockSharp,代码行数:12,代码来源:VirtualPortfolio.cs

示例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"));
		}
开发者ID:vikewoods,项目名称:StockSharp,代码行数:16,代码来源:ImportPane.xaml.cs

示例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);
			}
开发者ID:vikewoods,项目名称:StockSharp,代码行数:16,代码来源:ImportPane.xaml.cs


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