예제 #1
0
        public Template Convert(IAccountTemplate template)
        {
            Template target = new Template();
            GoogleSheetsAccountTemplate currentTemplate = (GoogleSheetsAccountTemplate)template;

            target.TemplateName = currentTemplate.TemplateName;
            target.TemplateId   = currentTemplate.TemplateId;
            List <MappingForSerialization> mappingList = new List <MappingForSerialization>();

            MappingForSerialization map = new MappingForSerialization();

            map.Key   = "Mapping";
            map.Value = currentTemplate.Mapping;
            mappingList.Add(map);

            //target.Mapping = mappingList.ToArray();
            return(target);
        }
        public Template Convert(IAccountTemplate template)
        {
            Template target = new Template();
            GoogleSheetsAccountTemplate currentTemplate = (GoogleSheetsAccountTemplate)template;

            target.TemplateName = currentTemplate.TemplateName;
            target.TemplateId = currentTemplate.TemplateId;
            List<MappingForSerialization> mappingList = new List<MappingForSerialization>();

            MappingForSerialization map = new MappingForSerialization();
            map.Key = "Mapping";
            map.Value = currentTemplate.Mapping;
            mappingList.Add(map);

            //target.Mapping = mappingList.ToArray();
            return target;
        }