/// <summary>
 ///     Specifies code generator for member
 /// </summary>
 public static IExportConfiguration <TsParameterAttribute> WithCodeGenerator <T>(
     this IExportConfiguration <TsParameterAttribute> conf)
     where T : ITsCodeGenerator <ParameterInfo>
 {
     conf.AttributePrototype.CodeGeneratorType = typeof(T);
     return(conf);
 }
 /// <summary>
 ///     Specifies code generator for member
 /// </summary>
 public static IExportConfiguration <TsInterfaceAttribute> WithCodeGenerator <T>(
     this IExportConfiguration <TsInterfaceAttribute> conf)
     where T : ITsCodeGenerator <Type>
 {
     conf.AttributePrototype.CodeGeneratorType = typeof(T);
     return(conf);
 }
Пример #3
0
        /// <nodoc />
        public ExportConfiguration(IExportConfiguration template, PathRemapper pathRemapper)
        {
            Contract.Assume(template != null);
            Contract.Assume(pathRemapper != null);

            SnapshotFile = pathRemapper.Remap(template.SnapshotFile);
            SnapshotMode = template.SnapshotMode;
        }
Пример #4
0
        public static bool CheckIgnored <T>(this IExportConfiguration <T> conf)
        {
            var ignore = conf as IIgnorable;

            if (ignore == null)
            {
                return(false);
            }
            return(ignore.Ignore);
        }
Пример #5
0
 /// <summary>
 /// Exports the provided data in format defined in the export configuration as excel file
 /// </summary>
 /// <param name="exportConfiguration"></param>
 /// <param name="data"></param>
 /// <returns></returns>
 public Stream Export(IExportConfiguration <TData> exportConfiguration, List <TData> data)
 {
     return(ExcelExtensions.Export(exportConfiguration as ExportConfiguration <TData>, data));
 }
 /// <summary>
 ///     Overrides member type on export with strong type.
 ///     Feel free to use delegates here. It is very comfortable instead of regular TS functions syntax.
 ///     Actually this method does the same as .Type call. Just for your convinence
 /// </summary>
 /// <param name="conf">Configurator</param>
 public static IExportConfiguration <TsTypedAttributeBase> Returns <T>(
     this IExportConfiguration <TsFunctionAttribute> conf)
 {
     conf.AttributePrototype.StrongType = typeof(T);
     return(conf);
 }