Esempio n. 1
0
        /// <summary>
        /// Apply the delta set
        /// </summary>
        private void ApplyDelta(string delta, ClassRepository classRepository)
        {
            // Load the Delta Set
            try
            {
                DeltaSet ds = DeltaSet.Load(delta);
                if (ds.MetaData == null)
                {
                    throw new InvalidOperationException("Delta set is missing data...");
                }

                DeltaEngine de = new DeltaEngine(ds);
                de.Apply(classRepository);
            }
            catch (Exception e)
            {
                Trace.WriteLine(String.Format("Delta: Won't apply '{0}', reason: {1}", delta, e.Message), "error");
                Exception ie = e.InnerException;
                while (ie != null)
                {
                    Trace.WriteLine(String.Format("Caused by: {0}", ie.Message), "error");
                    ie = ie.InnerException;
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Apply the delta set
        /// </summary>
        private void ApplyDelta(string delta, ClassRepository classRepository)
        {
            // Load the Delta Set
            try
            {
                DeltaSet ds = DeltaSet.Load(delta);
                if (ds.MetaData == null)
                    throw new InvalidOperationException("Delta set is missing data...");

                DeltaEngine de = new DeltaEngine(ds);
                de.Apply(classRepository);
                
            }
            catch (Exception e)
            {
                Trace.WriteLine(String.Format("Delta: Won't apply '{0}', reason: {1}", delta, e.Message), "error");
                Exception ie = e.InnerException;
                while (ie != null)
                {
                    Trace.WriteLine(String.Format("Caused by: {0}", ie.Message), "error");
                    ie = ie.InnerException;
                }
            }
        }