示例#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.");
        }
示例#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.");
            }
        }
示例#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.");
            }
        }
示例#4
0
文件: ULDto.cs 项目: umaranis/Prig
        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.");
            }
        }
示例#5
0
 internal ULColumns(ULTableStatus status)
 {
     m_status = status;
 }
示例#6
0
 internal ULColumns(ULTableStatus status)
 {
     m_status = status;
 }