BimlGen.BimlGenerator.GetBiml C# (CSharp) Метод

GetBiml() публичный статический Метод

public static GetBiml ( BimlRequest request ) : string
request BimlRequest
Результат string
        public static string GetBiml( BimlRequest request )
        {
            var biml = BuildBiml( request );

            var serializer = new XmlSerializer( biml.GetType() );
            using (var writer = new StringWriter())
            {
                serializer.Serialize( writer, biml );
                return writer.ToString();
            }
        }

Usage Example

Пример #1
0
        private void GetBiml(BimlRequest request)
        {
            var biml = BimlGenerator.GetBiml(request);

            if (!string.IsNullOrEmpty(biml))
            {
                var now       = DateTime.Now;
                var timestamp = "" + now.Hour + now.Minute + now.Second;
                File.WriteAllText(string.Format("{0}\\{1}{2}.biml", request.OutputFolder, request.DatabaseName, timestamp), biml);
            }
        }