Esempio n. 1
0
        private static Template CreateOpenDocumentTemplate <T>(this InternalOrganisation @this, byte[] content)
        {
            var media        = new MediaBuilder(@this.Strategy.Session).WithInData(content).Build();
            var templateType = new TemplateTypes(@this.Strategy.Session).OpenDocumentType;
            var template     = new TemplateBuilder(@this.Strategy.Session).WithMedia(media).WithTemplateType(templateType).WithArguments <T>().Build();

            return(template);
        }
Esempio n. 2
0
        public static Template CreateOpenDocumentTemplate <T>(this Singleton @this, string fileName, byte[] content)
        {
            var media        = new MediaBuilder(@this.Strategy.Session).WithInFileName(fileName).WithInData(content).Build();
            var templateType = new TemplateTypes(@this.Strategy.Session).OpenDocumentType;
            var template     = new TemplateBuilder(@this.Strategy.Session).WithMedia(media).WithTemplateType(templateType).WithArguments <T>().Build();

            return(template);
        }