private static FileSystemWorkItemEndpoint CreateAndConfigureInMemoryWorkItemEndpoint(EndpointDirection direction, string queryString)
        {
            FileSystemWorkItemEndpoint e     = CreateInMemoryWorkItemEndpoint(EndpointDirection.Source);
            FileSystemWorkItemQuery    query = new FileSystemWorkItemQuery();

            query.Configure(null, queryString, null);
            e.Configure(query, null);
            return(e);
        }
        private FileSystemWorkItemEndpoint CreateEndpoint(EndpointDirection direction)
        {
            var options = new FileSystemWorkItemEndpointOptions()
            {
                Direction = direction, FileStore = string.Format(@".\Store\{0}\", direction.ToString())
            };
            FileSystemWorkItemEndpoint e = Services.GetRequiredService <FileSystemWorkItemEndpoint>();

            e.Configure(options);
            return(e);
        }