Dev2.DynamicServices.FileSystemInstanceStoreIO.SaveInstanceDocument C# (CSharp) Method

SaveInstanceDocument() private static method

Saves the instance document.
private static SaveInstanceDocument ( String fullPath, System.Xml.Linq.XDocument xml ) : void
fullPath String The full path.
xml System.Xml.Linq.XDocument The XML.
return void
        private static void SaveInstanceDocument(String fullPath, XDocument xml)
        {
            lock(fullPath)
            {
                using(FileStream stream = new FileStream(fullPath, FileMode.Create))
                {
                    XmlWriterSettings settings = new XmlWriterSettings { Encoding = Encoding.UTF8 };
                    using(XmlWriter writer = XmlWriter.Create(stream, settings))
                    {
                        writer.WriteRaw(xml.ToString());
                    }
                }
            }
        }