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


C# JsonObject.GetStringField方法代码示例

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


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

示例1: FromJsonObject

		/// <summary>
		/// Constructs a ModuleDescriptor from a Json object
		/// </summary>
		/// <param name="InObject"></param>
		/// <returns>The new module descriptor</returns>
		public static ModuleDescriptor FromJsonObject(JsonObject InObject)
		{
			ModuleDescriptor Module = new ModuleDescriptor(InObject.GetStringField("Name"), InObject.GetEnumField<ModuleHostType>("Type"));

			ModuleLoadingPhase LoadingPhase;
			if (InObject.TryGetEnumField<ModuleLoadingPhase>("LoadingPhase", out LoadingPhase))
			{
				Module.LoadingPhase = LoadingPhase;
			}

			UnrealTargetPlatform[] WhitelistPlatforms;
			if (InObject.TryGetEnumArrayField<UnrealTargetPlatform>("WhitelistPlatforms", out WhitelistPlatforms))
			{
				Module.WhitelistPlatforms = WhitelistPlatforms;
			}

			UnrealTargetPlatform[] BlacklistPlatforms;
			if (InObject.TryGetEnumArrayField<UnrealTargetPlatform>("BlacklistPlatforms", out BlacklistPlatforms))
			{
				Module.BlacklistPlatforms = BlacklistPlatforms;
			}

			string[] AdditionalDependencies;
			if (InObject.TryGetStringArrayField("AdditionalDependencies", out AdditionalDependencies))
			{
				Module.AdditionalDependencies = AdditionalDependencies;
			}

			return Module;
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:35,代码来源:ModuleDescriptor.cs

示例2: FromJsonObject

 /// <summary>
 /// Construct a PluginReferenceDescriptor from a Json object
 /// </summary>
 /// <param name="RawObject">The Json object containing a plugin reference descriptor</param>
 /// <returns>New PluginReferenceDescriptor object</returns>
 public static PluginReferenceDescriptor FromJsonObject(JsonObject RawObject)
 {
     PluginReferenceDescriptor Descriptor = new PluginReferenceDescriptor(RawObject.GetStringField("Name"), null, RawObject.GetBoolField("Enabled"));
     RawObject.TryGetStringField("Description", out Descriptor.Description);
     RawObject.TryGetStringField("MarketplaceURL", out Descriptor.MarketplaceURL);
     RawObject.TryGetEnumArrayField<UnrealTargetPlatform>("WhitelistPlatforms", out Descriptor.WhitelistPlatforms);
     RawObject.TryGetEnumArrayField<UnrealTargetPlatform>("BlacklistPlatforms", out Descriptor.BlacklistPlatforms);
     return Descriptor;
 }
开发者ID:mymei,项目名称:UE4,代码行数:14,代码来源:PluginDescriptor.cs

示例3: FromJsonObject

		/// <summary>
		/// Constructs a LocalizationTargetDescriptor from a Json object
		/// </summary>
		/// <param name="InObject"></param>
		/// <returns>The new localization target descriptor</returns>
		public static LocalizationTargetDescriptor FromJsonObject(JsonObject InObject)
		{
			return new LocalizationTargetDescriptor(InObject.GetStringField("Name"), InObject.GetEnumField<LocalizationTargetDescriptorLoadingPolicy>("LoadingPolicy"));
		}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:9,代码来源:LocalizationDescriptor.cs


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