예제 #1
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="profile"></param>
        /// <param name="metadata"></param>
        public ProfileCommandHandle(ProfileHandle profile, CommandDescriptor metadata)
        {
            Contract.Requires<ArgumentNullException>(profile != null);
            Contract.Requires<ArgumentNullException>(metadata != null);

            Profile = profile;
            Metadata = metadata;
        }
예제 #2
0
        /// <summary>
        /// Loads the operation from the specified <see cref="MethodInfo"/>.
        /// </summary>
        /// <param name="method"></param>
        void LoadOperation(MethodInfo method)
        {
            System.Diagnostics.Contracts.Contract.Requires(method != null);

            var descriptor = operations[method];
            if (descriptor == null)
                descriptor = new CommandDescriptor(this);

            descriptor.Load(method);
            operations.Remove(descriptor);
            operations.Add(descriptor);
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="operation"></param>
        internal ParameterDescriptor(CommandDescriptor operation)
        {
            Contract.Requires<ArgumentNullException>(operation != null);

            this.operation = operation;
        }