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


C# ConformanceLevel类代码示例

本文整理汇总了C#中ConformanceLevel的典型用法代码示例。如果您正苦于以下问题:C# ConformanceLevel类的具体用法?C# ConformanceLevel怎么用?C# ConformanceLevel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: MwsXmlBuilder

 public MwsXmlBuilder(bool toWrap, ConformanceLevel conformanceLevel)
 {
     builder = new StringBuilder();
     XmlWriterSettings settings = new XmlWriterSettings();
     settings.OmitXmlDeclaration = !toWrap;
     settings.ConformanceLevel = conformanceLevel;
     writer = XmlWriter.Create(builder, settings);
 }
开发者ID:verveinfotech,项目名称:Innoventory,代码行数:8,代码来源:MwsXmlBuilder.cs

示例2: CheckReaderSettings

		private static void CheckReaderSettings(XmlReaderSettings settings, ConformanceLevel expectedConformanceLevel)
		{
			Assert.IsFalse(settings.CheckCharacters);
#if NET_4_0 && !__MonoCS__
			Assert.AreEqual(DtdProcessing.Parse, settings.DtdProcessing);
#else
			Assert.IsTrue(settings.ProhibitDtd);
#endif
			Assert.AreEqual(ValidationType.None , settings.ValidationType);
			Assert.IsTrue(settings.CloseInput);
			Assert.IsTrue(settings.IgnoreWhitespace);
			Assert.AreEqual(expectedConformanceLevel, settings.ConformanceLevel);
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:13,代码来源:CanonicalXmlSettingsTests.cs

示例3: Reset

		public void Reset()
		{
			checkCharacters = true;
			closeOutput = false;
			conformance = ConformanceLevel.Document;
			encoding = Encoding.UTF8;
			indent = false;
			indentChars = "  ";
			newLineChars = Environment.NewLine;
			newLineOnAttributes = false;
			newLineHandling = NewLineHandling.Replace;
			normalizeNewLines = true;
			omitXmlDeclaration = false;
			outputMethod = XmlOutputMethod.AutoDetect;
		}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:15,代码来源:XmlWriterSettings.cs

示例4: Reset

		public void Reset ()
		{
			checkCharacters = true;
			closeOutput = false; // ? not documented
			conformance = ConformanceLevel.Document;
			encoding = Encoding.UTF8;
			indent = false;
			indentChars = "  ";
			// LAMESPEC: MS.NET says it is "\r\n", but it is silly decision.
			newLineChars = Environment.NewLine;
			newLineOnAttributes = false;
			newLineHandling = NewLineHandling.None;
			omitXmlDeclaration = false;
			outputMethod = XmlOutputMethod.AutoDetect;
		}
开发者ID:desunit,项目名称:Mono-Class-Libraries,代码行数:15,代码来源:XmlWriterSettings.cs

示例5: Reset

		public void Reset ()
		{
			checkCharacters = true;
			closeOutput = false; // ? not documented
			conformance = ConformanceLevel.Document;
			encoding = Encoding.UTF8;
			indent = false;
			indentChars = "  ";
			newLineChars = "\r\n";
			newLineOnAttributes = false;
			newLineHandling = NewLineHandling.Replace;
			omitXmlDeclaration = false;
			outputMethod = XmlOutputMethod.AutoDetect;
#if NET_4_5
			isAsync = false;
#endif
		}
开发者ID:carrie901,项目名称:mono,代码行数:17,代码来源:XmlWriterSettings.cs

示例6: CreateXmlWriterSettings

		///<summary>
		/// Return an XmlWriterSettings suitable for use in Chorus applications.
		///</summary>
		/// <remarks>
		/// This formats with new line on attributes, indents with tab, and encoded in UTF8 with no BOM.
		/// </remarks>
		/// <param name="conformanceLevel">Document|Fragment</param>
		///<returns>XmlWriterSettings</returns>
		public static XmlWriterSettings CreateXmlWriterSettings(ConformanceLevel conformanceLevel)
		{
			var settings = new XmlWriterSettings
							   {
								   NewLineOnAttributes = true,              // New line for each attribute, saves space on a typical Chorus changeset.
								   Indent = true,                           // Indent entities
								   IndentChars = "\t",                      // Tabs for the indent
								   CheckCharacters = false,
								   Encoding = new UTF8Encoding(false),      // UTF8 without a BOM.
								   CloseOutput = true,                      // Close the underlying stream on Close.  This is not the default.
								   ConformanceLevel = conformanceLevel,
								   NewLineChars = "\r\n",                   // Use /r/n for our end of lines
								   NewLineHandling = NewLineHandling.None,  // Assume that the input is as written /r/n
								   OmitXmlDeclaration = false               // The default, an xml declaration is written
							   };
			return settings;
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:25,代码来源:CanonicalXmlSettings.cs

示例7: CreateXmlReaderSettings

		///<summary>
		/// Return an XmlReaderSettings suitable for use in Chorus applications.
		///</summary>
		/// <remarks>
		/// This formats with:
		///		CheckCharacters as 'false',
		///		ProhibitDtd as 'true',
		///		ValidationType as ValidationType.None,
		///		CloseInput as 'true',
		///		IgnoreWhitespace as 'true', and
		///		ConformanceLevel as 'conformanceLevel' parameter.
		/// </remarks>
		/// <param name="conformanceLevel">Document|Fragment</param>
		///<returns>XmlReaderSettings</returns>
		public static XmlReaderSettings CreateXmlReaderSettings(ConformanceLevel conformanceLevel)
		{
			var settings = new XmlReaderSettings
			{
				CheckCharacters = false,
				ConformanceLevel = conformanceLevel,
#if NET_4_0 && !__MonoCS__
				DtdProcessing = DtdProcessing.Parse,
#else
				ProhibitDtd = true,
#endif
				ValidationType = ValidationType.None,
				CloseInput = true,
				IgnoreWhitespace = true
			};
			return settings;
		}
开发者ID:jwickberg,项目名称:libpalaso,代码行数:31,代码来源:CanonicalXmlSettings.cs

示例8: Reset

		public void Reset ()
		{
			checkCharacters = true;
			closeInput = false; // ? not documented
			conformance = ConformanceLevel.Document;
			ignoreComments = false;
			ignoreProcessingInstructions = false;
			ignoreWhitespace = false;
			lineNumberOffset = 0;
			linePositionOffset = 0;
			prohibitDtd = true;
#if MOONLIGHT
			xmlResolver = new XmlXapResolver ();
#else
			schemas = null;
			schemasNeedsInitialization = true;
			validationFlags =
				XsValidationFlags.ProcessIdentityConstraints |
				XsValidationFlags.AllowXmlAttributes;
			validationType = ValidationType.None;
			xmlResolver = new XmlUrlResolver ();
#endif
		}
开发者ID:nkuln,项目名称:mono,代码行数:23,代码来源:XmlReaderSettings.cs

示例9: Initialize

        void Initialize(XmlResolver resolver) {
            nameTable = null;
#if !SILVERLIGHT
            if (!EnableLegacyXmlSettings())
            {
                xmlResolver = resolver;
                // limit the entity resolving to 10 million character. the caller can still
                // override it to any other value or set it to zero for unlimiting it
                maxCharactersFromEntities = (long) 1e7;
            }
            else
#endif            
            {
                xmlResolver = (resolver == null ? CreateDefaultResolver() : resolver);
                maxCharactersFromEntities = 0;
            }
            lineNumberOffset = 0;
            linePositionOffset = 0;
            checkCharacters = true;
            conformanceLevel = ConformanceLevel.Document;

            ignoreWhitespace = false;
            ignorePIs = false;
            ignoreComments = false;
            dtdProcessing = DtdProcessing.Prohibit;
            closeInput = false;

            maxCharactersInDocument = 0;

#if !SILVERLIGHT
            schemas = null;
            validationType = ValidationType.None;
            validationFlags = XmlSchemaValidationFlags.ProcessIdentityConstraints;
            validationFlags |= XmlSchemaValidationFlags.AllowXmlAttributes;
#endif

#if ASYNC || FEATURE_NETCORE
            useAsync = false;
#endif

            isReadOnly = false;
#if !SILVERLIGHT
            IsXmlResolverSet = false;
#endif
        }
开发者ID:uQr,项目名称:referencesource,代码行数:45,代码来源:XmlReaderSettings.cs

示例10: Initialize

        //
        // Private methods
        //
        private void Initialize()
        {
            _encoding = Encoding.UTF8;
            _omitXmlDecl = false;
            _newLineHandling = NewLineHandling.Replace;
            _newLineChars = Environment.NewLine; // "\r\n" on Windows, "\n" on Unix
            _indent = TriState.Unknown;
            _indentChars = "  ";
            _newLineOnAttributes = false;
            _closeOutput = false;
            _namespaceHandling = NamespaceHandling.Default;
            _conformanceLevel = ConformanceLevel.Document;
            _checkCharacters = true;
            _writeEndDocumentOnClose = true;

            _outputMethod = XmlOutputMethod.Xml;
            _cdataSections.Clear();
            _mergeCDataSections = false;
            _mediaType = null;
            _docTypeSystem = null;
            _docTypePublic = null;
            _standalone = XmlStandalone.Omit;
            _doNotEscapeUriAttributes = false;

            _useAsync = false;
            _isReadOnly = false;
        }
开发者ID:geoffkizer,项目名称:corefx,代码行数:30,代码来源:XmlWriterSettings.cs

示例11: OnRootElement

 internal override void OnRootElement(ConformanceLevel currentConformanceLevel) { 
     // Just remember the current conformance level
     conformanceLevel = currentConformanceLevel;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:4,代码来源:XmlEncodedRawTextWriter.cs

示例12: Reset

//
// Public methods
//
        public void Reset() {
            CheckReadOnly( "Reset" );

            nameTable = null;
            xmlResolver = new XmlUrlResolver();
            lineNumberOffset = 0;
            linePositionOffset = 0;
            checkCharacters = true;
            conformanceLevel = ConformanceLevel.Document;

            schemas = null;
            validationType = ValidationType.None;
            validationFlags = XmlSchemaValidationFlags.ProcessIdentityConstraints;
            validationFlags |= XmlSchemaValidationFlags.AllowXmlAttributes;
            ignoreWhitespace = false;
            ignorePIs = false;
            ignoreComments = false;
            prohibitDtd = true;
            closeInput = false;

            isReadOnly = false;
        }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:25,代码来源:xmlreadersettings.cs

示例13: XmlParsingOptions

      public XmlParsingOptions() {

         this.ConformanceLevel = ConformanceLevel.Document;
         this.XmlResolver = new XmlDynamicResolver(Assembly.GetCallingAssembly());
      }
开发者ID:nuxleus,项目名称:Nuxleus,代码行数:5,代码来源:XmlParsingOptions.cs

示例14: CreateWriter

 public virtual XmlWriter CreateWriter(ConformanceLevel cl)
 {
     return this.XmlWriterTestModule.WriterFactory.CreateWriter(cl);
 }
开发者ID:noahfalk,项目名称:corefx,代码行数:4,代码来源:XmlWriterTestCaseBase.cs

示例15: Initialize

        private void Initialize(XmlResolver resolver)
        {
            _nameTable = null;
            if (!EnableLegacyXmlSettings())
            {
                _xmlResolver = resolver;
                // limit the entity resolving to 10 million character. the caller can still
                // override it to any other value or set it to zero for unlimiting it
                _maxCharactersFromEntities = (long)1e7;
            }
            else
            {
                _xmlResolver = (resolver == null ? CreateDefaultResolver() : resolver);
                _maxCharactersFromEntities = 0;
            }
            _lineNumberOffset = 0;
            _linePositionOffset = 0;
            _checkCharacters = true;
            _conformanceLevel = ConformanceLevel.Document;

            _ignoreWhitespace = false;
            _ignorePIs = false;
            _ignoreComments = false;
            _dtdProcessing = DtdProcessing.Prohibit;
            _closeInput = false;

            _maxCharactersInDocument = 0;

            _schemas = null;
            _validationType = ValidationType.None;
            _validationFlags = XmlSchemaValidationFlags.ProcessIdentityConstraints;
            _validationFlags |= XmlSchemaValidationFlags.AllowXmlAttributes;

            _useAsync = false;

            _isReadOnly = false;
            IsXmlResolverSet = false;
        }
开发者ID:chcosta,项目名称:corefx,代码行数:38,代码来源:XmlReaderSettings.cs


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