BridgeStack.Query.ShallowCopy C# (CSharp) Метод

ShallowCopy() публичный Метод

Creates a copy of this query object instance, including parameter values.
public ShallowCopy ( ) : IQuery
Результат IQuery
        public IQuery ShallowCopy()
        {
            return (IQuery)MemberwiseClone();
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Through reflection, lists the query string parameters, verifies they are conform to constraint attributes, and returns the deserialized version of them.
        /// </summary>
        /// <returns>The query string parameters provided by the user, or the empty string.</returns>
        private string GetQueryStringParameters()
        {
            IQuery copy  = Query.ShallowCopy();            // avoid changes in the original parameter list.
            IQuery query = copy.WithDefault(Client.Default);

            return(query.ToQueryParams().Deserialize());
        }