@@ -139,24 +139,24 @@ private static void AddPicture(OpenXmlElement appendElement, string relationship
139139 } ) ;
140140 appendElement . Append ( ( element ) ) ;
141141 }
142- public static void SaveAsByTemplate ( string path , string templatePath , object value )
142+ public static void SaveAsByTemplate ( string path , string templatePath , Dictionary < string , object > value )
143143 {
144144 using ( var stream = File . Create ( path ) )
145145 SaveAsByTemplate ( stream , templatePath , value ) ;
146146 }
147147
148- public static void SaveAsByTemplate ( string path , byte [ ] templateBytes , object value )
148+ public static void SaveAsByTemplate ( string path , byte [ ] templateBytes , Dictionary < string , object > value )
149149 {
150150 using ( var stream = File . Create ( path ) )
151151 SaveAsByTemplate ( stream , templateBytes , value ) ;
152152 }
153153
154- public static void SaveAsByTemplate ( this Stream stream , string templatePath , object value )
154+ public static void SaveAsByTemplate ( this Stream stream , string templatePath , Dictionary < string , object > value )
155155 {
156156 SaveAsByTemplateImpl ( stream , GetBytes ( templatePath ) , value ) ;
157157 }
158158
159- public static void SaveAsByTemplate ( this Stream stream , byte [ ] templateBytes , object value )
159+ public static void SaveAsByTemplate ( this Stream stream , byte [ ] templateBytes , Dictionary < string , object > value )
160160 {
161161 SaveAsByTemplateImpl ( stream , templateBytes , value ) ;
162162 }
@@ -169,9 +169,9 @@ private static byte[] GetBytes(string path)
169169 return ms . ToArray ( ) ;
170170 }
171171 }
172- private static void SaveAsByTemplateImpl ( Stream stream , byte [ ] template , object data )
172+ private static void SaveAsByTemplateImpl ( Stream stream , byte [ ] template , Dictionary < string , object > data )
173173 {
174- var value = data as Dictionary < string , object > ; //TODO:
174+ var value = data ; //TODO: support dynamic and poco value
175175 byte [ ] bytes = null ;
176176 using ( var ms = new MemoryStream ( ) )
177177 {
0 commit comments