コード例 #1
0
ファイル: ObjectExtension.cs プロジェクト: madiantech/tkcore
        public static Dictionary <string, Object> WriteDictionary(this object receiver,
                                                                  string modelName, DictionaryOutput output)
        {
            if (receiver == null)
            {
                return(null);
            }

            IObjectSerializer serializer = ObjectExtension.CreateSerializer("Dictionary");
            DictionaryBuilder builder    = new DictionaryBuilder(output);
            object            writer     = serializer.CreateCustomWriter(builder);

            SerializerUtil.WriteSerializer(serializer, writer, receiver, modelName, ObjectUtil.WriteSettings, QName.Toolkit, null);

            return(builder.Data);
        }
コード例 #2
0
 public DictionaryBuilder(DictionaryOutput output)
 {
     fOutput = output ?? DictionaryOutput.Default;
     fData   = new Dictionary <string, object>();
 }
コード例 #3
0
ファイル: ObjectExtension.cs プロジェクト: madiantech/tkcore
 public static Dictionary <string, Object> WriteDictionary(this object receiver,
                                                           DictionaryOutput output)
 {
     return(WriteDictionary(receiver, null, output));
 }