Exemple #1
0
		/// <summary>
		/// Deinitialize schema.
		/// </summary><remarks>
		/// You must use this function to reinitialize schema.
		/// </remarks>
		public static void DeinitSchema()
		{
			if( m_Instance == null ) {
				throw new ApplicationException( "Schema isn't yet initialized." );
			}
			m_Instance = null;
		}
Exemple #2
0
		/// <summary>
		/// This method creates singleton instance of MetaData class.
		/// You must call this method before using MetaData instance.
		/// <param name="UICulture">Culture identifier.</param>
		/// <param name="xml">Schema file (.xml).</param>
		/// <param name="xsd">Schema description file (.xsd).</param>
		/// </summary>
		public static void InitSchema( string UICulture, Stream xml, Stream xsd )
		{
			if( m_Instance != null ) {
				throw new ApplicationException( "Schema is already initialized." );
			}
			// creating singleton instance of MetaData class
			m_Instance = new MetaData();
			// trying to initialize singleton instance
			try {
				m_Instance.initialize( UICulture, xml, xsd );
			} catch( Exception e ) {
				m_Instance = null;
				throw e;
			}
		}