Esempio n. 1
0
        /// <summary>
        /// Updates this schema so it can no longer generate a given problem when compared to another schema.
        /// </summary>
        /// <param name="problem">The change problem</param>
        public void ResolveProblem(ChangeProblem problem)
        {
            switch (problem.ProblemType)
            {
            case ChangeProblemType.DeletionNeeded:
                // Remove the problem for which deletion was needed
                TypeProperties.Remove(problem.TypeName);
                break;

            case ChangeProblemType.PropertyDropped:
            case ChangeProblemType.PropertyDroppedFromSummary:
                // Remove the property which was dropped
                TypeProperties[problem.TypeName].Remove(problem.PropertyName);
                break;

            // Problems not requiring data modification
            case ChangeProblemType.NotBinarySerializable:
            case ChangeProblemType.NullObjectValue:
                break;
            }
        }
        /// <summary>
        /// Updates this schema so it can no longer generate a given problem when compared to another schema.
        /// </summary>
        /// <param name="problem">The change problem</param>
        public void ResolveProblem(ChangeProblem problem)
        {
            string aqTypeName = problem.GetAssemblyQualifiedTypeName();

            switch (problem.ProblemType)
            {
            case ChangeProblemType.DeletionNeeded:
                // Remove the problem for which deletion was needed
                TypeProperties.Remove(aqTypeName);
                break;

            case ChangeProblemType.PropertyDropped:
            case ChangeProblemType.PropertyDroppedFromSummary:
                // Remove the property which was dropped
                TypeProperties[aqTypeName].Remove(problem.PropertyName);
                break;

            // Problems not requiring data modification
            case ChangeProblemType.NullObjectValue:
                break;
            }
        }