コード例 #1
0
 public static async Task<string> AsXmlAsync(
     this DbContext dbContext,
     DbContextConverterOptions options = null
    )
 {
     var converter = new XmlDbContextConverter(dbContext, options);
     return await converter.Serialize();
 }
コード例 #2
0
        public static async Task <string> AsXmlAsync(
            this DbContext dbContext,
            ContextDataEnum contextData
            )
        {
            DbContextConverterOptions options = DbContextConverterOptions.DEFAULT.WithContextData(contextData);

            return(await dbContext.AsXmlAsync(options));
        }
コード例 #3
0
        public static async Task <string> AsXmlAsync(
            this DbContext dbContext,
            DbContextConverterOptions options = null
            )
        {
            var converter = new XmlDbContextConverter(dbContext, options);

            return(await converter.Serialize());
        }
コード例 #4
0
        public AbstractDbContextSerializer(DbContext context, DbContextConverterOptions options)
        {
            Context = context;

            if (options == null)
            {
                Options = GetDefaultOptions();
            }
            else
            {
                Options = options;
            }
        }
コード例 #5
0
 public XmlDbContextConverter(DbContext context, DbContextConverterOptions options = null) : base(context, new XmlDbContextConverterOptions(options))
 {
 }
コード例 #6
0
 public XmlDbContextConverterOptions(DbContextConverterOptions options = null) : base (options)
 {
 }