private static void LoadImports(ImportElement[] elements, Snippet snippet)
 {
     foreach (ImportElement element in elements)
     {
         if (!string.IsNullOrEmpty(element.Namespace))
             snippet.Namespaces.Add(element.Namespace);
     }
 }
        private static ImportElement[] CreateImportsElements(NamespaceCollection namespaces)
        {
            if (namespaces.Count > 0)
            {
                var elements = new ImportElement[namespaces.Count];

                for (int i = 0; i < namespaces.Count; i++)
                    elements[i] = new ImportElement() { Namespace = namespaces[i] };

                return elements;
            }

            return null;
        }