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


C# com.getSchemaType方法代码示例

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


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

示例1: getFeatureMask

 /*
 int oldState = getFeatureMask();
 int newState = (oldState & ~mask) | (values & mask);
 return setFeatureMask(newState);
 */
 /*
 /**********************************************************
 /* Public API, Schema configuration
 /**********************************************************
 */
 /// <summary>Method to call to make this generator use specified schema.</summary>
 /// <remarks>
 /// Method to call to make this generator use specified schema.
 /// Method must be called before generating any content, right after instance
 /// has been created.
 /// Note that not all generators support schemas; and those that do usually only
 /// accept specific types of schemas: ones defined for data format this generator
 /// produces.
 /// <p>
 /// If generator does not support specified schema,
 /// <see cref="System.NotSupportedException"/>
 /// is thrown.
 /// </remarks>
 /// <param name="schema">Schema to use</param>
 /// <exception cref="System.NotSupportedException">if generator does not support schema
 /// 	</exception>
 public virtual void setSchema(com.fasterxml.jackson.core.FormatSchema schema)
 {
     throw new System.NotSupportedException("Generator of type " + GetType().FullName
         + " does not support schema of type '" + schema.getSchemaType() + "'");
 }
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:31,代码来源:JsonGenerator.cs

示例2: canUseSchema

		/*
		/**********************************************************
		/* Format detection functionality
		/**********************************************************
		*/
		/// <summary>
		/// Method that can be used to quickly check whether given schema
		/// is something that parsers and/or generators constructed by this
		/// factory could use.
		/// </summary>
		/// <remarks>
		/// Method that can be used to quickly check whether given schema
		/// is something that parsers and/or generators constructed by this
		/// factory could use. Note that this means possible use, at the level
		/// of data format (i.e. schema is for same data format as parsers and
		/// generators this factory constructs); individual schema instances
		/// may have further usage restrictions.
		/// </remarks>
		/// <since>2.1</since>
		public virtual bool canUseSchema(com.fasterxml.jackson.core.FormatSchema schema)
		{
			string ourFormat = getFormatName();
			return (ourFormat != null) && ourFormat.Equals(schema.getSchemaType());
		}
开发者ID:davidraleigh,项目名称:jackson-parser-cs,代码行数:24,代码来源:JsonFactory.cs


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