コード例 #1
0
ファイル: Dump.cs プロジェクト: dox0/DotNet471RS3
 /// <summary>
 /// PolymorphicColumnMap
 /// </summary>
 /// <param name="columnMap"></param>
 /// <param name="dumper"></param>
 /// <returns></returns>
 internal override void Visit(SimplePolymorphicColumnMap columnMap, Dump dumper)
 {
     using (new AutoXml(dumper, "SimplePolymorphic", GetAttributes(columnMap))) {
         using (new AutoXml(dumper, "typeDiscriminator")) {
             columnMap.TypeDiscriminator.Accept(this, dumper);
         }
         Dictionary <string, object> attrs = new Dictionary <string, object>();
         foreach (KeyValuePair <object, TypedColumnMap> tc in columnMap.TypeChoices)
         {
             attrs.Clear();
             attrs.Add("DiscriminatorValue", tc.Key);
             using (new AutoXml(dumper, "choice", attrs)) {
                 tc.Value.Accept(this, dumper);
             }
         }
         using (new AutoXml(dumper, "default")) {
             VisitList(columnMap.Properties, dumper);
         }
     }
 }
コード例 #2
0
 internal abstract TResultType Visit(SimplePolymorphicColumnMap columnMap, TArgType arg);