private static void LoadReferences(ReferenceElement[] references, Snippet snippet)
        {
            foreach (ReferenceElement element in references)
            {
                if (!string.IsNullOrEmpty(element.Assembly))
                {
                    var reference = new AssemblyReference();

                    reference.AssemblyName = element.Assembly;

                    if (!string.IsNullOrEmpty(element.Url))
                    {
                        Uri url;
                        if (Uri.TryCreate(element.Url, UriKind.RelativeOrAbsolute, out url))
                            reference.Url = url;
                    }

                    snippet.AssemblyReferences.Add(reference);
                }
            }
        }
        private static ReferenceElement[] CreateReferenceElements(Collection<AssemblyReference> references)
        {
            if (references.Count > 0)
            {
                var elements = new ReferenceElement[references.Count];

                for (int i = 0; i < references.Count; i++)
                {
                    var element = new ReferenceElement() { Assembly = references[i].AssemblyName };

                    if (references[i].Url != null)
                        element.Url = references[i].Url.ToString();

                    elements[i] = element;
                }

                return elements;
            }

            return null;
        }