Ejemplo n.º 1
0
 public void When(RegistrationCreated e)
 {
     _entity.Add(e.Id, new RegistrationView
     {
         Status       = "Processing registration",
         Registration = e.Id,
     });
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 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
     });
 }
Ejemplo n.º 4
0
        /* ----------------------------------------------------------------- */
        ///
        /// 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);
            }
        }
Ejemplo n.º 5
0
        /* ----------------------------------------------------------------- */
        ///
        /// 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
     });
 }
Ejemplo n.º 7
0
 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());
 }
Ejemplo n.º 9
0
 /* ----------------------------------------------------------------- */
 ///
 /// 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 });
Ejemplo n.º 10
0
 /* ----------------------------------------------------------------- */
 ///
 /// 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);
Ejemplo n.º 11
0
 /* ----------------------------------------------------------------- */
 ///
 /// 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);
Ejemplo n.º 12
0
 /* ----------------------------------------------------------------- */
 ///
 /// 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 });