public ConditionPrinterV2(PropertyNameContext context, Recorder recorder) { NameConvention = NameConventionsStorage.Condition; Context = context; Recorder = recorder; var condition = Context.PropertyMap.OriginalCondition; IsExist = condition != null; if (IsExist) { string template = ToTemplate(condition); Recorder.AppendLine($"if ({template})"); Recorder.AppendLine("{{"); } }
public BeforeMapPrinter(TypeNameContext context, Recorder recorder) { NameConvention = NameConventionsStorage.BeforeMap; Context = context; Recorder = recorder; var statements = Context.TypeMap.BeforeMapStatements; IsExist = statements.Any(); if (IsExist) { List <string> templates = statements.Select(ToTemplate).ToList(); string template = string.Join("", templates); Recorder.AppendLine("{{ "); Recorder.AppendLine(template); } }
public BeforeStorageBuilder(IDictionary <TypePair, TypeMap> explicitTypeMaps) { ExplicitTypeMaps = explicitTypeMaps.ToImmutableDictionary(); Convention = NameConventionsStorage.BeforeMap; }
public ConditionStorageBuilder(IDictionary <TypePair, TypeMap> explicitTypeMaps) { ExplicitTypeMaps = explicitTypeMaps.ToImmutableDictionary(); Convention = NameConventionsStorage.Condition; }