當前位置: 首頁>>代碼示例>>C#>>正文


C# ChangeTrackingService.CreateBookmark方法代碼示例

本文整理匯總了C#中Topics.Radical.ChangeTracking.ChangeTrackingService.CreateBookmark方法的典型用法代碼示例。如果您正苦於以下問題:C# ChangeTrackingService.CreateBookmark方法的具體用法?C# ChangeTrackingService.CreateBookmark怎麽用?C# ChangeTrackingService.CreateBookmark使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Topics.Radical.ChangeTracking.ChangeTrackingService的用法示例。


在下文中一共展示了ChangeTrackingService.CreateBookmark方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: service_revert_to_a_bookmark_created_by_another_service

        public void service_revert_to_a_bookmark_created_by_another_service()
        {
            ChangeTrackingService svc1 = new ChangeTrackingService();
            IBookmark bmk = svc1.CreateBookmark();

            ChangeTrackingService svc2 = new ChangeTrackingService();
            svc2.Revert( bmk );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:8,代碼來源:EntityChangeTrackingServiceTests.cs

示例2: service_successfully_revert_to_a_valid_bookmark_created_at_initial_state

        public void service_successfully_revert_to_a_valid_bookmark_created_at_initial_state()
        {
            String expected = String.Empty;

            ChangeTrackingService svc = new ChangeTrackingService();
            IBookmark bmk = svc.CreateBookmark();

            Person p = new Person( svc );
            p.Name = "foo..";
            p.Name = "foo once again...";

            svc.Revert( bmk );

            Assert.AreEqual<String>( expected, p.Name );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:15,代碼來源:EntityChangeTrackingServiceTests.cs

示例3: service_validate_a_bookmark_owned_by_another_service_is_false

        public void service_validate_a_bookmark_owned_by_another_service_is_false()
        {
            ChangeTrackingService svc1 = new ChangeTrackingService();
            var bmk = svc1.CreateBookmark();

            ChangeTrackingService svc2 = new ChangeTrackingService();

            Assert.IsFalse( svc2.Validate( bmk ) );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:9,代碼來源:EntityChangeTrackingServiceTests.cs

示例4: service_validate_a_bookmark_invalid_is_false

        public void service_validate_a_bookmark_invalid_is_false()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = "Mauro";

            var bmk = svc.CreateBookmark();
            svc.Undo();

            Assert.IsFalse( svc.Validate( bmk ) );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:12,代碼來源:EntityChangeTrackingServiceTests.cs

示例5: service_with_no_changes_create_non_null_bookmark

        public void service_with_no_changes_create_non_null_bookmark()
        {
            ChangeTrackingService svc = new ChangeTrackingService();
            var bmk = svc.CreateBookmark();

            Assert.IsNotNull( bmk );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:7,代碼來源:EntityChangeTrackingServiceTests.cs

示例6: service_validate_a_valid_bookmark_is_true

        public void service_validate_a_valid_bookmark_is_true()
        {
            RejectCallback<String> cb = cv => { };
            Object fakeOwner = new Object();
            String change = String.Empty;
            IChange expected = new PropertyValueChange<String>( fakeOwner, "property-name", change, cb );

            ChangeTrackingService svc = new ChangeTrackingService();
            svc.Add( expected, AddChangeBehavior.RedoRequest );

            var bmk = svc.CreateBookmark();

            Assert.IsTrue( svc.Validate( bmk ) );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:14,代碼來源:EntityChangeTrackingServiceTests.cs

示例7: ChangeTrackingService

        public void changeTrackingService_revert_normal_entity_registered_transient_with_no_autoRemove_and_no_changes_after_bookmark_creation_is_still_transient()
        {
            var expected = EntityTrackingStates.IsTransient;

            var memento = new ChangeTrackingService();
            var bookmark = memento.CreateBookmark();

            var person = new Person( memento, false );

            memento.RegisterTransient( person, false );
            memento.Revert( bookmark );

            var actual = memento.GetEntityState( person );

            actual.Should().Be.EqualTo( expected );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:16,代碼來源:EntityChangeTrackingServiceTests.cs

示例8: service_on_revert_with_nothing_to_do_not_raise_trackingServiceStateChanged_event

        public void service_on_revert_with_nothing_to_do_not_raise_trackingServiceStateChanged_event()
        {
            Int32 expected = 0;
            Int32 actual = 0;

            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            var bmk = svc.CreateBookmark();

            svc.TrackingServiceStateChanged += ( s, e ) => { actual++; };
            svc.Revert( bmk );

            Assert.AreEqual<Int32>( expected, actual );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:15,代碼來源:EntityChangeTrackingServiceTests.cs

示例9: service_cannot_revert_to_an_invalid_bookmark

        public void service_cannot_revert_to_an_invalid_bookmark()
        {
            ChangeTrackingService svc = new ChangeTrackingService();

            Person p = new Person( svc );
            p.Name = "Mauro";

            var bmk = svc.CreateBookmark();
            svc.Undo();
            svc.Revert( bmk );
        }
開發者ID:RadicalFx,項目名稱:Radical,代碼行數:11,代碼來源:EntityChangeTrackingServiceTests.cs


注:本文中的Topics.Radical.ChangeTracking.ChangeTrackingService.CreateBookmark方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。