public void When(RegistrationCreated e) { _entity.Add(e.Id, new RegistrationView { Status = "Processing registration", Registration = e.Id, }); }
public void add_new_value() { Test1 t = new Test1 { Value = 555 }; var newValue = _guidKeyClassWriter.Add(Guid.NewGuid(), t); Assert.AreEqual(t, newValue); Assert.AreEqual(555, newValue.Value); }
public void When(SecurityPasswordAdded e) { _writer.Add(e.UserId, new LoginView { Security = e.Id, Display = e.DisplayName, Token = e.Token, PasswordHash = e.PasswordHash, PasswordSalt = e.PasswordSalt, Type = LoginViewType.Password, LoginTrackingThreshold = DefaultThreshold }); }
/* ----------------------------------------------------------------- */ /// /// AddDocument /// /// <summary> /// PDF ファイルを追加します。 /// </summary> /// /* ----------------------------------------------------------------- */ private void AddDocument(PdfFile src, IDocumentWriter dest) { var query = new Query <string>(e => e.Cancel = true); using (var reader = new Cube.Pdf.Itext.DocumentReader(src.FullName, query, true, true, IO)) { dest.Add(reader.Pages); } }
/* ----------------------------------------------------------------- */ /// /// AddImage /// /// <summary> /// 画像ファイルを追加します。 /// </summary> /// /* ----------------------------------------------------------------- */ private void AddImage(ImageFile src, IDocumentWriter dest) { var pages = IO.GetImagePages(src.FullName); if (pages != null) { dest.Add(pages); } }
public void When(GoalSet e) { _writer.Add(e.Id, new GoalHierarchalView { Description = e.Description, GoalId = e.Id, User = e.User }); }
public void When(GoalSet e) { _writer.Add(e.Id, new GoalCalendarView { GoalId = e.Id, DateStarted = e.StartDate, GoalDescription = e.Description, User = e.User }); }
public void When(CustomerCreated e) { _store.Add(e.Id, new CustomerTransactions()); }
/* ----------------------------------------------------------------- */ /// /// Attach /// /// <summary> /// Adds a new attached file. /// </summary> /// /// <param name="src">IDocumentWriter object.</param> /// <param name="file">Attached file.</param> /// /* ----------------------------------------------------------------- */ public static void Attach(this IDocumentWriter src, Attachment file) => src.Add(new[] { file });
/* ----------------------------------------------------------------- */ /// /// Add /// /// <summary> /// Adds all pages of the specified document. /// </summary> /// /// <param name="src">IDocumentWriter object.</param> /// <param name="reader">IDocumentReader object.</param> /// /* ----------------------------------------------------------------- */ public static void Add(this IDocumentWriter src, IDocumentReader reader) => src.Add(reader.Pages, reader);
/* ----------------------------------------------------------------- */ /// /// Add /// /// <summary> /// Adds a new page. /// </summary> /// /// <param name="src">IDocumentWriter object.</param> /// <param name="page">Page information.</param> /// <param name="hint"> /// Document reader object to get more detailed information about /// the specified pages. /// </param> /// /* ----------------------------------------------------------------- */ public static void Add(this IDocumentWriter src, Page page, IDocumentReader hint) => src.Add(new[] { page }, hint);
/* ----------------------------------------------------------------- */ /// /// Add /// /// <summary> /// Adds a new page. /// </summary> /// /// <param name="src">IDocumentWriter object.</param> /// <param name="page">Page information.</param> /// /* ----------------------------------------------------------------- */ public static void Add(this IDocumentWriter src, Page page) => src.Add(new[] { page });