Ejemplo n.º 1
0
        static void ValidateState(ULTableStatus status)
        {
            if (!status.IsOpened)
                throw new InvalidOperationException("The column can not be modified because owner table has not been opened.");

            if (0 < status.RowsCount)
                throw new ArgumentException("The column can not be modified because some rows already exist.");
        }
Ejemplo n.º 2
0
        static void ValidateState(ULTableStatus status)
        {
            if (!status.IsOpened)
            {
                throw new InvalidOperationException("The column can not be modified because owner table has not been opened.");
            }

            if (0 < status.RowsCount)
            {
                throw new ArgumentException("The column can not be modified because some rows already exist.");
            }
        }
Ejemplo n.º 3
0
        static void ValidateState(ULTableStatus status)
        {
            if (!status.IsOpened)
            {
                Console.WriteLine(string.Format("{0} property value is {1}.", ULNameHalper.GetName(() => status.IsOpened), status.IsOpened));
                Console.WriteLine(string.Format("By the way, look at {0} field. What do you think of it?", ULNameHalper.GetName(() => DateTime.MaxValue)));
                throw new InvalidOperationException("The column can not be modified because owner table has not been opened.");
            }

            if (0 < status.RowsCount)
            {
                Console.WriteLine(string.Format("{0}.", ULNameHalper.GetName(() => ULConfigurationManager.GetProperty("foo", "bar"))));
                Console.WriteLine(string.Format("When are you going to do it? If not {0}, then when?", ULNameHalper.GetName(() => DateTime.Now)));
                throw new ArgumentException("The column can not be modified because some rows already exist.");
            }
        }
Ejemplo n.º 4
0
        static void ValidateState(ULTableStatus status)
        {
            if (!status.IsOpened)
            {
                Console.WriteLine(string.Format("{0} property value is {1}.", ULNameHalper.GetName(() => status.IsOpened), status.IsOpened));
                Console.WriteLine(string.Format("By the way, look at {0} field. What do you think of it?", ULNameHalper.GetName(() => DateTime.MaxValue)));
                throw new InvalidOperationException("The column can not be modified because owner table has not been opened.");
            }

            if (0 < status.RowsCount)
            {
                Console.WriteLine(string.Format("{0}.", ULNameHalper.GetName(() => ULConfigurationManager.GetProperty("foo", "bar"))));
                Console.WriteLine(string.Format("When are you going to do it? If not {0}, then when?", ULNameHalper.GetName(() => DateTime.Now)));
                throw new ArgumentException("The column can not be modified because some rows already exist.");
            }
        }
Ejemplo n.º 5
0
 internal ULColumns(ULTableStatus status)
 {
     m_status = status;
 }
Ejemplo n.º 6
0
 internal ULColumns(ULTableStatus status)
 {
     m_status = status;
 }