private static bool TryGetInt64Key(IReadOnlyKeyValueCollection parameters, out Int64Key key)
        {
            if (parameters.TryGet("Type", out string type) && parameters.TryGet("ID", out long id))
            {
                key = Int64Key.Create(id, type);
                return(true);
            }

            key = null;
            return(false);
        }
コード例 #2
0
        public static Int64Key FindInt64KeyWithoutType(this KeyToParametersConverter converter, IReadOnlyKeyValueCollection parameters, string keyType, string prefix)
        {
            Ensure.NotNull(converter, "converter");
            Int64Key key;

            if (converter.TryGetWithoutType(parameters, keyType, prefix, out key))
            {
                return(key);
            }

            return(Int64Key.Empty(keyType));
        }