Exemplo n.º 1
0
 /// <summary>
 /// This returns monitoring information for all subscriptions using this Distributor.
 /// </summary>
 /// <param name="connection">The connection to run the command on.</param>
 /// <param name="filterpublisher">To limit the result set to a single Publisher, specify filterpublisher.</param>
 /// <param name="filterpublisherdb">To limit the result set to a single Publisher Database, specify filterpublisherdb.</param>
 /// <param name="filterpublication">To limit the result set to a single Publication, specify filterpublisher.</param>
 /// <param name="filterpublicationtype">To limit the result set to a single Publication Type, specify filterpublicationtype.</param>
 /// <param name="filtermode">To limit the result set to a specific subset, specify filterpublicationtype.</param>
 /// <param name="topnum">Restricts the result set to only the specified number of subscriptions at the top of the returned data.</param>
 /// <param name="excludeanonymous">Is if anonymous pull subscriptions are excluded from the result set.</param>
 /// <returns>This returns monitoring information for all subscriptions using this Distributor.</returns>
 /// <remarks>See <a href="http://technet.microsoft.com/en-us/library/ms188073.aspx">MSDN</a></remarks>
 public static IEnumerable <Subscription> ListSubscriptions(this SqlConnection connection,
                                                            string filterpublisher = null, string filterpublisherdb = null, string filterpublication = null,
                                                            PublicationType filterpublicationtype = PublicationType.Any, Mode filtermode = Mode.All,
                                                            int topnum = 0, bool excludeanonymous = false)
 {
     return(connection.Query <Subscription>("sp_replmonitorhelpsubscription",
                                            new
     {
         publisher = new DbString {
             Value = filterpublisher, IsAnsi = true, Length = 128
         },
         publisher_db = new DbString {
             Value = filterpublisherdb, IsAnsi = true, Length = 128
         },
         publication = new DbString {
             Value = filterpublication, IsAnsi = true, Length = 128
         },
         publication_type = filterpublicationtype == PublicationType.Any ? null : (int?)filterpublicationtype,
         mode = filtermode,
         topnum = topnum <= 0 ? null : (int?)topnum,
         exclude_anonymous = excludeanonymous
     },
                                            commandType: CommandType.StoredProcedure
                                            ));
 }
Exemplo n.º 2
0
        public Publication(string title, string publisher, PublicationType type)
        {
            if (publisher == null)
            {
                throw new ArgumentNullException("The publisher cannot be null.");
            }
            else if (String.IsNullOrWhiteSpace(publisher))
            {
                throw new ArgumentException("The publisher cannot consist only of white space.");
            }

            Publisher = publisher;

            if (title == null)
            {
                throw new ArgumentNullException("The title cannot be null.");
            }
            else if (String.IsNullOrWhiteSpace(title))
            {
                throw new ArgumentException("The title cannot consist only of white space.");
            }

            Title = title;

            Type = type;
        }
Exemplo n.º 3
0
        public async Task WriteAsync(IEnumerable <ISerie <TKey, TEntry> > items, PublicationType publicationType, Publish publish, bool useTemporaryStorageOnFailure)
        {
            // ensure we only iterate the original collection once, if it is not a list or array
            if (!(items is ICollection <ISerie <TKey, TEntry> > || items is Array))
            {
                items = items.ToList();
            }

            var tasks = new List <Task <IEnumerable <ISerie <TKey, TEntry> > > >();

            tasks.AddRange(LookupStorages(items).Select(c => WriteToStorageAsync(c.Storage, c.Lookups, useTemporaryStorageOnFailure)));
            await Task.WhenAll(tasks).ConfigureAwait(false);

            // Only publish things that were written
            var writtenItems = tasks.SelectMany(x => x.Result);

            if (publish.HasFlag(Publish.Remotely))
            {
                if (_remotePublishSubscribe == null)
                {
                    throw new MissingTsdbServiceException("No remote publish subscribe store has been provided for the TsdbClient.");
                }

                await _remotePublishSubscribe.PublishAsync(writtenItems, publicationType).ConfigureAwait(false);
            }
            if (publish.HasFlag(Publish.Locally))
            {
                await _localPublishSubscribe.PublishAsync(writtenItems, publicationType).ConfigureAwait(false);
            }
        }
Exemplo n.º 4
0
        public ActionResult Create(IEnumerable <Author> Author, [Bind("Id", Prefix = "Search")] IEnumerable <Author> Search,
                                   Publication Publication, PublicationType PublicationType, string TranslateText)
        {
            var selectedAuthors = Search.Where(s => s.Id != 0);
            var createdAuthors  = Author.Where(a => a.IsValid());

            if (!(!string.IsNullOrEmpty(Publication.PublicationName) && (createdAuthors.Count() > 0 || selectedAuthors.Count() > 0)))
            {
                ViewBag.Result = "Данные введены не корректно";
                return(View("Publication"));
            }
            if (PublicationType.IsValid())
            {
                manager.Create(PublicationType);
                Publication.PublicationType = PublicationType.Id;
            }
            if (!string.IsNullOrEmpty(TranslateText))
            {
                Publication.TranslateText = TranslateText;
            }
            if (Publication.Id != 0)
            {
                manager.Update <Publication>(Publication);
            }
            else
            {
                manager.Create(Publication);
            }
            CreatePA(Publication.Id, createdAuthors, selectedAuthors);
            var list = new List <Publication>();

            list.Add(Publication);
            return(View("Publications", list));
        }
Exemplo n.º 5
0
        private static void AddPulicationType(CitationUniSofiaContext db)
        {
            var publicationType = new string[]
            {
                "Статия",
                "Публикация",
                "Монография",
                "Доклади"
            };

            var publicationTypeCollection = new List <PublicationType>();

            foreach (var publ in publicationType)
            {
                var currPubl = new PublicationType
                {
                    Name = publ
                };

                publicationTypeCollection.Add(currPubl);
            }

            db.PublicationTypes.AddRange(publicationTypeCollection);
            db.SaveChanges();
        }
Exemplo n.º 6
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            PublicationType publicationType = db.PublicationTypes.Find(id);

            db.PublicationTypes.Remove(publicationType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 7
0
 private Publication(string Name, Author Writer, PublicationType Type, DateTime DatePublished, string Publisher)
 {
     this.Name          = Name;
     this.Writer        = Writer;
     this.Type          = Type;
     this.DatePublished = DatePublished;
     this.Publisher     = Publisher;
 }
Exemplo n.º 8
0
        public async Task PublishAsync(IEnumerable <ISerie <TKey, TEntry> > entries, PublicationType publish)
        {
            if (publish == PublicationType.None)
            {
                return;
            }

            await OnPublished(entries, publish).ConfigureAwait(false);
        }
Exemplo n.º 9
0
 public ActionResult Edit([Bind(Include = "ID,NAME")] PublicationType publicationType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(publicationType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(publicationType));
 }
Exemplo n.º 10
0
        public ActionResult Create([Bind(Include = "ID,NAME")] PublicationType publicationType)
        {
            if (ModelState.IsValid)
            {
                db.PublicationTypes.Add(publicationType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(publicationType));
        }
        private string GetPublicationGenericPunktNine(String title, PublicationType type, List <Publication> publications)
        {
            if (publications == null || publications.Where(x => x.PublicationType == type).Count() == 0)
            {
                return("");
            }
            var list = publications.Where(x => x.PublicationType == type).ToList();
            var size = list.Sum(x => x.SizeOfPages);

            return(GetTemplatePublicationByType(title, list.Count.ToString(), size.ToString(), title.ToLower()));
        }
Exemplo n.º 12
0
        // 9	Добавление
        // Добавить новое издание
        public void Query09(string pubIndex, string typeName, string title, double price)
        {
            PublicationType pubType = _db.PublicationTypes.First(pt => pt.TypeName == typeName);

            _db.Publications
            .Add(new Publication {
                PublicationIndex  = pubIndex,
                IdPublicationType = pubType.Id,
                Title             = title,
                Price             = price
            });
            _db.SaveChanges();
        } // Query09
Exemplo n.º 13
0
        // GET: PublicationType/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PublicationType publicationType = db.PublicationTypes.Find(id);

            if (publicationType == null)
            {
                return(HttpNotFound());
            }
            return(View(publicationType));
        }
Exemplo n.º 14
0
 public TsdbWriteBatcher(
     TsdbClient <TKey, TEntry> client,
     PublicationType publish,
     TimeSpan writeInterval,
     int maxBatchSize,
     ITsdbLogger logger)
 {
     _client        = client;
     _writeInterval = writeInterval;
     _publish       = publish;
     _maxBatchSize  = maxBatchSize;
     _batches       = new Queue <BatchWrite <TKey, TEntry> >();
     _cts           = new CancellationTokenSource();
     _logger        = logger;
 }
 /// <summary>
 /// This returns monitoring information for all publications using this Distributor.
 /// </summary>
 /// <param name="connection">The connection to run the command on.</param>
 /// <param name="filterpublisher">To limit the result set to a single Publisher, specify filterpublisher.</param>
 /// <param name="filterpublisherdb">To limit the result set to a single Publisher Database, specify filterpublisherdb.</param>
 /// <param name="filterpublication">To limit the result set to a single Publication, specify filterpublisher.</param>
 /// <param name="filterpublicationtype">To limit the result set to a single Publication Type, specify filterpublicationtype.</param>
 /// <returns>This returns monitoring information for all publications using this Distributor.</returns>
 /// <remarks>See <a href="http://technet.microsoft.com/en-us/library/ms186304.aspx">MSDN</a></remarks>
 public static IEnumerable<Publication> ListPublications(this SqlConnection connection, 
     string filterpublisher = null, string filterpublisherdb = null, string filterpublication = null, 
     PublicationType filterpublicationtype = PublicationType.Any)
 {
     return connection.Query<Publication>("sp_replmonitorhelppublication",
         new
         {
             publisher = new DbString { Value = filterpublisher, IsAnsi = true, Length = 128 },
             publisher_db = new DbString { Value = filterpublisherdb, IsAnsi = true, Length = 128 },
             publication = new DbString { Value = filterpublication, IsAnsi = true, Length = 128 },
             publication_type = filterpublicationtype == PublicationType.Any ? null : (int?)filterpublicationtype
         },
         commandType: CommandType.StoredProcedure
     );
 }
Exemplo n.º 16
0
    public Publication(string title, string publisher, PublicationType type)
    {
        if (String.IsNullOrWhiteSpace(publisher))
        {
            throw new ArgumentException("The publisher is required.");
        }
        Publisher = publisher;

        if (String.IsNullOrWhiteSpace(title))
        {
            throw new ArgumentException("The title is required.");
        }
        Title = title;

        Type = type;
    }
Exemplo n.º 17
0
        public Publication(string title, string publisher, PublicationType type)
        {
            if (String.IsNullOrWhiteSpace(publisher))
            {
                throw new ArgumentException("El editor es requerido");
            }
            this.Publisher = publisher;

            if (String.IsNullOrWhiteSpace(title))
            {
                throw new ArgumentException("El titulo es requerido");
            }
            this.Title = title;

            this.Type = type;
        }
Exemplo n.º 18
0
        private string getTitleForPage(PublicationType type, CrudMode mode)
        {
            string result = null;

            switch (type)
            {
            case PublicationType.News:
            {
                switch (mode)
                {
                case CrudMode.Add:
                {
                    result = "Створення новини";
                    break;
                }

                case CrudMode.Edit:
                {
                    result = "Редагування новину";
                    break;
                }
                }
                break;
            }

            case PublicationType.Article:
            {
                switch (mode)
                {
                case CrudMode.Add:
                {
                    result = "Створення статті";
                    break;
                }

                case CrudMode.Edit:
                {
                    result = "Редагування статті";
                    break;
                }
                }
                break;
            }
            }

            return(result);
        }
Exemplo n.º 19
0
        public ActionResult Create([Bind(Include = "Name,Description")] PublicationType publicationType)
        {
            if (ModelState.IsValid)
            {
                publicationType.PublicationTypeID = Guid.NewGuid();

                publicationType.DateCreated  = DateTime.Now;
                publicationType.DateModified = publicationType.DateCreated;

                publicationType.UserCreatedID  = Guid.Parse(User.Identity.GetUserId());
                publicationType.UserModifiedID = publicationType.UserCreatedID;
                db.PublicationTypes.Add(publicationType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(publicationType));
        }
Exemplo n.º 20
0
        public ActionResult Edit([Bind(Include = "PublicationTypeID,Name,Description")] PublicationTypeViewModel publicationTypeViewModel)
        {
            if (ModelState.IsValid)
            {
                PublicationType model = db.PublicationTypes.Find(publicationTypeViewModel.PublicationTypeID);

                model.Name        = publicationTypeViewModel.Name;
                model.Description = publicationTypeViewModel.Description;

                model.DateModified   = DateTime.Now;
                model.UserModifiedID = Guid.Parse(User.Identity.GetUserId());

                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(publicationTypeViewModel));
        }
Exemplo n.º 21
0
 public TsdbWriteBatcher(
     TsdbClient <TKey, TEntry> client,
     PublicationType publishType,
     Publish publishMode,
     bool useTempStorage,
     TimeSpan writeInterval,
     int maxBatchSize,
     ITsdbLogger logger)
 {
     _client         = client;
     _writeInterval  = writeInterval;
     _publishType    = publishType;
     _publishMode    = publishMode;
     _useTempStorage = useTempStorage;
     _maxBatchSize   = maxBatchSize;
     _batches        = new Queue <BatchWrite <TKey, TEntry> >();
     _cts            = new CancellationTokenSource();
     _logger         = logger;
 }
Exemplo n.º 22
0
 /// <summary>
 /// This returns monitoring information for all publications using this Distributor.
 /// </summary>
 /// <param name="connection">The connection to run the command on.</param>
 /// <param name="filterpublisher">To limit the result set to a single Publisher, specify filterpublisher.</param>
 /// <param name="filterpublisherdb">To limit the result set to a single Publisher Database, specify filterpublisherdb.</param>
 /// <param name="filterpublication">To limit the result set to a single Publication, specify filterpublisher.</param>
 /// <param name="filterpublicationtype">To limit the result set to a single Publication Type, specify filterpublicationtype.</param>
 /// <returns>This returns monitoring information for all publications using this Distributor.</returns>
 /// <remarks>See <a href="http://technet.microsoft.com/en-us/library/ms186304.aspx">MSDN</a></remarks>
 public static IEnumerable <Publication> ListPublications(this SqlConnection connection,
                                                          string filterpublisher = null, string filterpublisherdb = null, string filterpublication = null,
                                                          PublicationType filterpublicationtype = PublicationType.Any)
 {
     return(connection.Query <Publication>("sp_replmonitorhelppublication",
                                           new
     {
         publisher = new DbString {
             Value = filterpublisher, IsAnsi = true, Length = 128
         },
         publisher_db = new DbString {
             Value = filterpublisherdb, IsAnsi = true, Length = 128
         },
         publication = new DbString {
             Value = filterpublication, IsAnsi = true, Length = 128
         },
         publication_type = filterpublicationtype == PublicationType.Any ? null : (int?)filterpublicationtype
     },
                                           commandType: CommandType.StoredProcedure
                                           ));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PublicationReporting" /> class.
 /// </summary>
 /// <param name="PublicationType">PublicationType (required).</param>
 /// <param name="Feeds">The feeds that were published (required).</param>
 public PublicationReporting(PublicationType PublicationType = default(PublicationType), List <PublicationFeedReporting> Feeds = default(List <PublicationFeedReporting>))
 {
     // to ensure "PublicationType" is required (not null)
     if (PublicationType == null)
     {
         throw new InvalidDataException("PublicationType is a required property for PublicationReporting and cannot be null");
     }
     else
     {
         this.PublicationType = PublicationType;
     }
     // to ensure "Feeds" is required (not null)
     if (Feeds == null)
     {
         throw new InvalidDataException("Feeds is a required property for PublicationReporting and cannot be null");
     }
     else
     {
         this.Feeds = Feeds;
     }
 }
Exemplo n.º 24
0
        public List <Publication> GetVisiblePublicationsByType(PublicationType type)
        {
            var result = publicationRepository
                         .Search(
                new PublicationQuery
            {
                IsVisible   = true,
                StartDateTo = type == PublicationType.News ? DateTime.Now.Date.AddDays(1) : default(DateTime?),
                LanguageId  = RequestData.LanguageId,
                TypeId      = EnumHelper.PublicationTypes[type]
            });

            if (result.IsNotNullOrEmpty())
            {
                foreach (var publication in result)
                {
                    publication.Pictures = attachmentRepository.GetFiles(publication.Id.Value, ObjectType.Publication);
                }
            }

            return(result);
        }
        private string GetPublicationArticlesOrConferencesTemplate(String title, PublicationType type, List <Publication> publications)
        {
            if (publications == null || publications.Where(x => x.PublicationType == type).Count() == 0)
            {
                return("");
            }
            var toReturn = "";
            var list     = publications.Where(x => x.PublicationType == type).ToList();
            int index    = 1;

            foreach (var item in publications)
            {
                if (item.PublicationType == type)
                {
                    toReturn += index + ". " + publicationService.GenerateNameOfPublication(item) + "\n\r";
                    index++;
                }
            }
            return(ReplaceStringWithParameters(GenerateTemplateForGenericPunkt(title), new Dictionary <string, string>()
            {
                [GENERIC_TEXT_CONST] = toReturn,
            }));
        }
        private ActionResult GetActivePublicationsByType(
            PublicationType type,
            Func <PublicationPublicViewModel, bool> filter = null)
        {
            List <Publication> result;

            using (ContextManager.NewConnection())
            {
                result = publicationService.GetVisiblePublicationsByType(type);
            }

            var publications = Mapper.Map <List <PublicationPublicViewModel> >(result ?? new List <Publication>());

            if (filter != null)
            {
                publications = publications.Where(filter).ToList();
            }

            PublicContentHelper.DecodeAndTrimContent(publications, ConfigurationReader.TrimLength);
            InitBreadcrumb(type == PublicationType.News ? Resource.News : Resource.Events);
            ViewBag.PublicationType = type;
            return(View("Publications", publications));
        }
        private string GetPublicationTableGeneric(PublicationType type, List <Publication> publications)
        {
            if (publications == null || publications.Where(x => x.PublicationType == type).Count() == 0)
            {
                return("");
            }
            var publicationRows = "";

            foreach (var item in publications)
            {
                if (item.PublicationType == type)
                {
                    publicationRows += ReplaceStringWithParameters(GetTemplatePublicationRow(), new Dictionary <string, string>()
                    {
                        [PUBLICATION_ROW_NAME]  = publicationService.GenerateNameOfPublication(item),
                        [PUBLICATION_ROW_PAGES] = item.SizeOfPages.ToString(),
                    });
                }
            }
            return(ReplaceStringWithParameters(GetTemplatePublicationTable(), new Dictionary <string, string>()
            {
                [PUBLICATION_ROW] = publicationRows,
            }));
        }
Exemplo n.º 28
0
        public async Task CombinePipelineModules(
            [Values] bool isAsync,
            [Values] bool isFiltered,
            [Values] bool isProjected,
            [Values] bool isQueued,
            [Values] PublicationType publicationType
            )
        {
            var testRunParameters = new TestRunParameters
            {
                IsAsync         = isAsync,
                IsFiltered      = isFiltered,
                IsProjected     = isProjected,
                IsQueued        = isQueued,
                PublicationType = publicationType
            };

            SetUpContext(testRunParameters);

            await RaiseEvent(isAsync);

            if (isQueued)
            {
                await _context.ProcessQueuedEventsAsync(_eventsScope);
            }

            var subscribingService = publicationType == PublicationType.ScopedWithServiceHandlerSubscription
                ? _scopedSubscribingService
                : _singletonSubscribingService;

            Assert.That(subscribingService,
                        isProjected
                    ? Has.Property(nameof(SubscribingService.ProjectedTestEvents)).With.One.Items
                    : Has.Property(nameof(SubscribingService.TestEvents)).With.One.Items
                        );
        }
        public Publication(string publisher, string title, PublicationType type)
        {
            if (string.IsNullOrEmpty(publisher))
            {
                throw new ArgumentNullException("The Publisher can't be null");
            }
            else if (string.IsNullOrWhiteSpace(publisher))
            {
                throw new ArgumentException("Publisher can't have only whitespace");
            }
            Publisher = publisher;

            if (string.IsNullOrEmpty(title))
            {
                throw new ArgumentNullException("Title can't be null");
            }
            else if (string.IsNullOrWhiteSpace(title))
            {
                throw new ArgumentException("Title can't have only whitespace");
            }
            Title = title;

            Type = type;
        }
Exemplo n.º 30
0
 public static Task WriteAsync <TKey, TEntry>(this TsdbClient <TKey, TEntry> client, ISerie <TKey, TEntry> serie, PublicationType publicationType, Publish publish, bool useTemporaryStorageOnFailure)
     where TEntry : IEntry
 {
     return(client.WriteAsync(new[] { serie }, publicationType, publish, useTemporaryStorageOnFailure));
 }
Exemplo n.º 31
0
 public static Task WriteAsync <TKey, TEntry>(this TsdbClient <TKey, TEntry> client, ISerie <TKey, TEntry> serie, PublicationType publicationType)
     where TEntry : IEntry
 {
     return(client.WriteAsync(new[] { serie }, publicationType));
 }
 public IEnumerable<Publication> ListPublications(string connectionstringname, string publisher = null, string publisherdb = null, string publication = null, PublicationType publicationtype = PublicationType.Any)
 {
     using (var c = GetOpenConnection(connectionstringname))
         return c.ListPublications(publisher, publisherdb, publication, publicationtype);
 }
 public IEnumerable<PublicationThreshold> ListPublicationThresholds(string connectionstringname, string publisher = null, string publisherdb = null, string publication = null, PublicationType? publicationtype = null, string thresholdmetricname = null)
 {
     using (var c = GetOpenConnection(connectionstringname))
         return c.ListPublicationThresholds(publisher, publisherdb, publication, publicationtype, thresholdmetricname);
 }
 public IEnumerable<Subscription> ListSubscriptions(string connectionstringname, string publisher = null, string publisherdb = null, string publication = null, PublicationType publicationtype = PublicationType.Any, Mode mode = Mode.All, int topnum = 0, bool excludeanonymous = false)
 {
     using (var c = GetOpenConnection(connectionstringname))
         return c.ListSubscriptions(publisher, publisherdb, publication, publicationtype, mode, topnum, excludeanonymous);
 }
 /// <summary>
 /// This returns monitoring information for all subscriptions using this Distributor.
 /// </summary>
 /// <param name="connection">The connection to run the command on.</param>
 /// <param name="filterpublisher">To limit the result set to a single Publisher, specify filterpublisher.</param>
 /// <param name="filterpublisherdb">To limit the result set to a single Publisher Database, specify filterpublisherdb.</param>
 /// <param name="filterpublication">To limit the result set to a single Publication, specify filterpublisher.</param>
 /// <param name="filterpublicationtype">To limit the result set to a single Publication Type, specify filterpublicationtype.</param>
 /// <param name="filtermode">To limit the result set to a specific subset, specify filterpublicationtype.</param>
 /// <param name="topnum">Restricts the result set to only the specified number of subscriptions at the top of the returned data.</param>
 /// <param name="excludeanonymous">Is if anonymous pull subscriptions are excluded from the result set.</param>
 /// <returns>This returns monitoring information for all subscriptions using this Distributor.</returns>
 /// <remarks>See <a href="http://technet.microsoft.com/en-us/library/ms188073.aspx">MSDN</a></remarks>
 public static IEnumerable<Subscription> ListSubscriptions(this SqlConnection connection, 
     string filterpublisher = null, string filterpublisherdb = null, string filterpublication = null, 
     PublicationType filterpublicationtype = PublicationType.Any, Mode filtermode = Mode.All, 
     int topnum = 0, bool excludeanonymous = false)
 {
     return connection.Query<Subscription>("sp_replmonitorhelpsubscription",
         new
         {
             publisher = new DbString { Value = filterpublisher, IsAnsi = true, Length = 128 },
             publisher_db = new DbString { Value = filterpublisherdb, IsAnsi = true, Length = 128 },
             publication = new DbString { Value = filterpublication, IsAnsi = true, Length = 128 },
             publication_type = filterpublicationtype == PublicationType.Any ? null : (int?)filterpublicationtype,
             mode = filtermode,
             topnum = topnum <= 0 ? null : (int?)topnum,
             exclude_anonymous = excludeanonymous
         },
         commandType: CommandType.StoredProcedure
     );
 }