예제 #1
0
		protected virtual void Delete(ITestableReplicationProviderInside provider)
		{
			ArrayList toDelete = new ArrayList();
			IEnumerator rr = provider.GetStoredObjects(typeof(R0)).GetEnumerator();
			while (rr.MoveNext())
			{
				object o = rr.Current;
				IReflectClass claxx = ReplicationReflector().ForObject(o);
				SetFieldsToNull(o, claxx);
				toDelete.Add(o);
			}
			object commitObject = null;
			for (IEnumerator iterator = toDelete.GetEnumerator(); iterator.MoveNext(); )
			{
				object o = iterator.Current;
				//System.out.println("o = " + o);
				provider.Delete(o);
				commitObject = o;
			}
			if (commitObject != null)
			{
				provider.Commit();
			}
			else
			{
				provider.Commit();
			}
		}
예제 #2
0
        protected virtual void Delete(ITestableReplicationProviderInside provider)
        {
            ArrayList   toDelete = new ArrayList();
            IEnumerator rr       = provider.GetStoredObjects(typeof(R0)).GetEnumerator();

            while (rr.MoveNext())
            {
                object        o     = rr.Current;
                IReflectClass claxx = ReplicationReflector().ForObject(o);
                SetFieldsToNull(o, claxx);
                toDelete.Add(o);
            }
            object commitObject = null;

            for (IEnumerator iterator = toDelete.GetEnumerator(); iterator.MoveNext();)
            {
                object o = iterator.Current;
                //System.out.println("o = " + o);
                provider.Delete(o);
                commitObject = o;
            }
            if (commitObject != null)
            {
                provider.Commit();
            }
            else
            {
                provider.Commit();
            }
        }
        private void DeleteObject(ITestableReplicationProviderInside container, string name
                                  )
        {
            Replicated obj = Find(container, name);

            container.Delete(obj);
        }
		private void DeleteObject(ITestableReplicationProviderInside container, string name
			)
		{
			Replicated obj = Find(container, name);
			container.Delete(obj);
		}