public GasLogManager(INoteSerializer <GasLog> noteSerializer, IHmmValidator <GasLog> validator, IHmmNoteManager noteManager, IAutoEntityManager <AutomobileInfo> autoManager, IEntityLookup lookupRepo, IDateTimeProvider dateProvider) : base(validator, noteManager, lookupRepo) { Guard.Against <ArgumentNullException>(autoManager == null, nameof(autoManager)); Guard.Against <ArgumentNullException>(noteSerializer == null, nameof(noteSerializer)); Guard.Against <ArgumentNullException>(dateProvider == null, nameof(dateProvider)); _autoManager = autoManager; NoteSerializer = noteSerializer; _dateProvider = dateProvider; }
private void SetupTestEnv() { InsertSeedRecords(); _user = LookupRepo.GetEntities <Author>().FirstOrDefault(); var schemaStr = File.ReadAllText("NotebaseSchema.xsd"); var catalog = new NoteCatalog { Schema = schemaStr }; _noteSerializer = new TestDefaultXmlNoteSerializer(new NullLogger <HmmNote>(), catalog); }
public static HmmNote GetNote(this GasDiscount discount, INoteSerializer <GasDiscount> serializer, Author author) { Guard.Against <ArgumentNullException>(author == null, nameof(author)); if (discount == null) { return(null); } var note = serializer.GetNote(discount); note.Author = author; return(note); }
public static HmmNote GetNote(this AutomobileInfo automobile, INoteSerializer <AutomobileInfo> serializer, Author author) { Guard.Against <ArgumentNullException>(author == null, nameof(author)); if (automobile == null) { return(null); } var note = serializer.GetNote(automobile); note.Author = author; return(note); }
public static HmmNote GetNote(this GasLog log, INoteSerializer <GasLog> serializer, Author author) { Guard.Against <ArgumentNullException>(author == null, nameof(author)); if (log == null) { return(null); } var note = serializer.GetNote(log); note.Subject = GasLog.GetNoteSubject(log.Car.Id); note.Author = author; return(note); }
public AutomobileManager(INoteSerializer <AutomobileInfo> noteSerializer, IHmmValidator <AutomobileInfo> validator, IHmmNoteManager noteManager, IEntityLookup lookupRepo) : base(validator, noteManager, lookupRepo) { Guard.Against <ArgumentNullException>(noteSerializer == null, nameof(noteSerializer)); NoteSerializer = noteSerializer; }
private void SetupDevEnv() { InsertSeedRecords(); _noteSerializer = new GasDiscountXmlNoteSerializer(Application, new NullLogger <GasDiscount>(), LookupRepo); _author = ApplicationRegister.DefaultAuthor; }
private void SetupDevEnv() { InsertSeedRecords(); _noteSerializer = new AutomobileXmlNoteSerializer(Application, new NullLogger <AutomobileInfo>(), LookupRepo); _author = ApplicationRegister.DefaultAuthor; }
public DiscountManager(INoteSerializer <GasDiscount> noteSerializer, IHmmValidator <GasDiscount> validator, IHmmNoteManager noteManager, IEntityLookup lookupRepo) : base(validator, noteManager, lookupRepo) { Guard.Against <ArgumentNullException>(noteSerializer == null, nameof(noteSerializer)); NoteSerializer = noteSerializer; }