예제 #1
0
파일: StateBagCas.cs 프로젝트: nobled/mono
		public void IStateManager_Deny_Unrestricted ()
		{
			IStateManager sm = new StateBag ();
			Assert.IsFalse (sm.IsTrackingViewState, "IsTrackingViewState");
			object state = sm.SaveViewState ();
			sm.LoadViewState (state);
			sm.TrackViewState ();
		}
예제 #2
0
 protected override void LoadViewState(object savedState)
 {
     if (savedState != null)
     {
         Pair p = (Pair)savedState;
         base.LoadViewState(p.First);
         if (p.Second != null)
         {
             EnsureAttributes();
             attrBag.LoadViewState(p.Second);
         }
     }
 }
        protected override void LoadViewState(object savedState)
        {
            if (savedState != null)
            {
                Pair myState = (Pair)savedState;
                base.LoadViewState(myState.First);

                if (myState.Second != null)
                {
                    if (attributeStorage == null)
                    {
                        attributeStorage = new StateBag(true);
                        attributeStorage.TrackViewState();
                    }
                    attributeStorage.LoadViewState(myState.Second);
                }
            }
        }