コード例 #1
0
        /// <summary>
        /// Asserts proper exception for non-supported operation.
        /// </summary>
        internal static void AssertNotSupportedFeatureOperation(Action action, ClientBitmaskFeature feature, ClientOp op)
        {
            var ex = Assert.Catch <Exception>(() => action()).GetBaseException();

            var expectedMessage = string.Format(
                "Operation {0} is not supported by the server. " +
                "Feature {1} is missing.",
                op, feature);

            Assert.AreEqual(expectedMessage, ex.Message);
        }
コード例 #2
0
ファイル: ClientFeatures.cs プロジェクト: pks-os/gridgain
        /// <summary>
        /// Returns a value indicating whether specified feature is supported.
        /// </summary>
        public bool HasFeature(ClientBitmaskFeature feature)
        {
            var index = (int)feature;

            return(_features != null && index >= 0 && index < _features.Count && _features.Get(index));
        }