Ejemplo n.º 1
0
        public void Close()
        {
            if (m_profile == null)
            {
                return;
            }

            if (m_needsFlushing)
            {
                Flush();
            }

            m_doc = null;

            if (m_file != null)
            {
                m_file.Close();
                m_file = null;
            }

            if (m_profile != null)
            {
                m_profile.m_buffer = null;
            }
            m_profile = null;
        }
Ejemplo n.º 2
0
        internal XmlBuffer(XmlBased profile, bool lockFile)
        {
            m_profile = profile;

            if (lockFile)
            {
                m_profile.VerifyName();
                if (File.Exists(m_profile.Name))
                {
                    m_file = new FileStream(m_profile.Name, FileMode.Open, m_profile.ReadOnly ? FileAccess.Read : FileAccess.ReadWrite, FileShare.Read);
                }
            }
        }
Ejemplo n.º 3
0
 protected XmlBased(XmlBased profile) :
     base(profile)
 {
     m_encoding = profile.Encoding;
 }
Ejemplo n.º 4
0
		protected XmlBased(XmlBased profile) :
			base(profile)
		{
			m_encoding = profile.Encoding;
		}
Ejemplo n.º 5
0
		public void Close()
		{
			if (m_profile == null)
				return;
				
			if (m_needsFlushing)
				Flush();

			m_doc = null;
		
			if (m_file != null)
			{
				m_file.Close();
				m_file = null;
			}

			if (m_profile != null)
				m_profile.m_buffer = null;
			m_profile = null;
		}
Ejemplo n.º 6
0
		internal XmlBuffer(XmlBased profile, bool lockFile)
		{
			m_profile = profile;

			if (lockFile)
			{
				m_profile.VerifyName();
				if (File.Exists(m_profile.Name))
					m_file = new FileStream(m_profile.Name, FileMode.Open, m_profile.ReadOnly ? FileAccess.Read : FileAccess.ReadWrite, FileShare.Read);
			}
		}