ValidateString() 공개 정적인 메소드

public static ValidateString ( string value, string message, string paramName ) : void
value string
message string
paramName string
리턴 void
예제 #1
0
        public CompositeUserActivityReport(
            int db,
            string key,
            string operation,
            UserActivityReport left,
            UserActivityReport right)
            : base(db, key)
        {
            Validation.ValidateString(
                operation,
                ErrorMessages.CompositeUserActivityReport_Constructor_Operation_Required,
                "operation");

            if (left == null)
            {
                throw new ArgumentNullException("left");
            }

            if (left == null)
            {
                throw new ArgumentNullException("left");
            }

            Operation = operation;
            Left      = left;
            Right     = right;
        }
        public CompositeUserActivityReport(
            int db,
            string key,
            string operation,
            string leftKey,
            string rightKey)
            : base(db, key)
        {
            Validation.ValidateString(
                operation,
                ErrorMessages.CompositeUserActivityReport_Constructor_Operation_Required,
                "operation");

            Validation.ValidateString(
                leftKey,
                ErrorMessages.CompositeUserActivityReport_Constructor_LeftKey_Required,
                "leftKey");

            Validation.ValidateString(
                rightKey,
                ErrorMessages.CompositeUserActivityReport_Constructor_RightKey_Required,
                "rightKey");

            Operation = operation;
            LeftKey   = leftKey;
            RightKey  = rightKey;
        }
        public UserActivityReport(int db, string key)
        {
            Validation.ValidateDb(db);
            Validation.ValidateString(
                key,
                ErrorMessages.UserActivityReport_Constructor_Required,
                "key");

            Db  = db;
            Key = key;
        }
예제 #4
0
        public Subscription(
            RedisSubscriberConnection connection,
            string prefix)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }

            Validation.ValidateString(
                prefix,
                ErrorMessages.Subscription_Constructor_Prefix_Required,
                "prefix");

            this.connection = connection;
            this.prefix     = prefix;
        }
예제 #5
0
        public Subscription(
            RedisSubscriberConnection connection,
            string channel,
            Action <TInfo> action)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }

            Validation.ValidateString(
                channel,
                ErrorMessages.Subscription_Constructor_Channel_Required,
                "channel");

            if (action == null)
            {
                throw new ArgumentNullException("action");
            }

            this.connection = connection;
            this.channel    = channel;
            this.action     = action;
        }