System.Data.XmlTreeGen.SetPath C# (CSharp) Метод

SetPath() приватный Метод

private SetPath ( XmlWriter xw ) : void
xw XmlWriter
Результат void
        internal void SetPath(XmlWriter xw)
        {
            FileStream fs = null;

            DataTextWriter sw = xw as DataTextWriter;
            fs = (sw != null) ? sw.BaseStream as FileStream : null;

            if (fs == null)
            {
                XmlTextWriter textw = xw as XmlTextWriter;
                if (textw == null)
                    return;
                fs = textw.BaseStream as FileStream;
                if (fs == null)
                    return;
            }

            _filePath = Path.GetDirectoryName(fs.Name);
            _fileName = Path.GetFileNameWithoutExtension(fs.Name);
            _fileExt = Path.GetExtension(fs.Name);
            if (!string.IsNullOrEmpty(_filePath))
                _filePath = _filePath + "\\";
        }