Beispiel #1
0
        public async Task <CommandResponse <bool?> > SetSubverseListChange(DomainReference setReference, string subverse, SubscriptionAction action)
        {
            DemandAuthentication();
            var set = GetSet(setReference.Name, setReference.OwnerName);

            if (set == null)
            {
                return(CommandResponse.FromStatus <bool?>(null, Status.Denied, "Set cannot be found"));
            }

            //Check Perms
            var perms = SetPermission.GetPermissions(set.Map(), User.Identity);

            if (!perms.EditList)
            {
                return(CommandResponse.FromStatus <bool?>(null, Status.Denied, "User not authorized to modify set"));
            }

            var sub = GetSubverseInfo(subverse);

            if (sub == null)
            {
                return(CommandResponse.FromStatus <bool?>(null, Status.Denied, "Subverse cannot be found"));
            }

            return(await SetSubverseListChange(set, sub, action).ConfigureAwait(CONSTANTS.AWAIT_CAPTURE_CONTEXT));
        }
        public async Task <IViewComponentResult> InvokeAsync(DomainReference domainReference)
        {
            var q = new QuerySubverseModerators(domainReference.Name);
            var r = await q.ExecuteAsync();

            return(View(r));
        }
        public async Task <IViewComponentResult> InvokeAsync(DomainReference domainReference)
        {
            if (VoatSettings.Instance.AdsEnabled)
            {
                // TODO: check if currently logged in user is a donor or subscriber and has opted out of ads, if so, do not display any ads whatsoever
                var renderAd = true;

                ////Turn off ads for Donors
                //var q = new QueryUserData(User.Identity.Name);
                //var userData = await q.Execute();
                //if (userData != null && userData.Information.Badges.Any(x => x.Name.StartsWith("Donor")))
                //{
                //    renderAd = userData.Preferences.DisplayAds;
                //}

                if (renderAd)
                {
                    return(View("SidebarAd", GetAdModel(domainReference.Name, true)));
                }
                else
                {
                    return(View("SidebarAd")); //a null model will prevent ad from rendering any html
                }
            }

            return(View("SidebarAd")); //a null model will prevent ad from rendering any html
        }
Beispiel #4
0
        public async Task <ActionResult> Delete(string name)
        {
            if (ModelState.IsValid)
            {
                //TODO: Implement Command/Query - Remove direct Repository access
                using (var repo = new Repository(User))
                {
                    var domainReference = DomainReference.Parse(name, DomainType.Set);
                    var result          = await repo.DeleteSet(domainReference);

                    if (result.Success)
                    {
                        if (Request.IsAjaxRequest())
                        {
                            return(JsonResult(result));
                        }
                        else
                        {
                            return(new RedirectToRouteResult("UserSets", new RouteValueDictionary()
                            {
                                { "pathPrefix", "user" }, { "userName", User.Identity.Name }
                            }));
                        }
                    }
                    else
                    {
                        ModelState.AddModelError("", result.Message);
                    }
                }
            }
            return(await Index(name, ""));
        }
        public async Task <IViewComponentResult> InvokeAsync(DomainReference domainReference, ContentReference contentReference = null)
        {
            IViewComponentResult result = View("Default", domainReference);

            if (domainReference != null)
            {
                switch (domainReference.Type)
                {
                case DomainType.Subverse:
                    Subverse subverse = null;

                    if (!String.IsNullOrEmpty(domainReference.Name))
                    {
                        var q = new QuerySubverse(domainReference.Name);
                        subverse = await q.ExecuteAsync();
                    }
                    if (subverse != null)
                    {
                        var qa = new QueryActiveSessionCount(domainReference);
                        ViewBag.OnlineUsers = await qa.ExecuteAsync();

                        var view = "Subverse";    // contentReference != null && contentReference.Type == ContentType.Submission ? "Submission" : "Subverse";

                        if (contentReference != null)
                        {
                            switch (contentReference.Type)
                            {
                            case ContentType.Vote:
                                view = "VoteSubmission";
                                break;
                            }
                        }


                        result = View(view, subverse);
                    }
                    else
                    {
                        result = View("Default");
                    }
                    break;

                case DomainType.User:
                    result = View("User", domainReference);
                    break;

                case DomainType.Set:
                    var qSet = new QuerySet(domainReference.Name, domainReference.OwnerName);
                    var set  = await qSet.ExecuteAsync();

                    result = View("Set", set);
                    break;
                }
            }

            return(result);

            return(View("Chat", domainReference));
        }
Beispiel #6
0
        public async Task TestActiveSessionCount()
        {
            var d      = new DomainReference(DomainType.Subverse, "whatever");
            var qa     = new QueryActiveSessionCount(d);
            var result = await qa.ExecuteAsync();

            Assert.IsTrue(result >= 0, "Expecting a positive number");
        }
Beispiel #7
0
        public async Task <JsonResult> ListChange(string name, string subverse, Domain.Models.SubscriptionAction subscribeAction)
        {
            var domainReference = DomainReference.Parse(name, DomainType.Set);
            //Only user sets can be changed, thus userName never needs to be checked here.
            var cmd    = new SetSubverseCommand(domainReference, subverse, subscribeAction).SetUserContext(User);
            var result = await cmd.Execute();

            return(JsonResult(result));
        }
Beispiel #8
0
        public async Task <CommandResponse <bool?> > DeleteSet(DomainReference setReference)
        {
            DemandAuthentication();
            var set = GetSet(setReference.Name, setReference.OwnerName);

            if (set == null)
            {
                return(CommandResponse.FromStatus <bool?>(null, Status.Denied, "Set cannot be found"));
            }

            //Check Perms
            var perms = SetPermission.GetPermissions(set.Map(), User.Identity);

            if (!perms.Delete)
            {
                return(CommandResponse.FromStatus <bool?>(null, Status.Denied, "User not authorized to delete set"));
            }

            var param = new DynamicParameters();

            param.Add("ID", set.ID);

            var conn = _db.Connection;

            //var tran = conn.BeginTransaction(System.Data.IsolationLevel.Serializable);
            try
            {
                var d = new DapperDelete();

                d.Delete = SqlFormatter.DeleteBlock(SqlFormatter.Table("SubverseSetSubscription"));
                d.Where  = "\"SubverseSetID\" = @ID";
                await conn.ExecuteAsync(d.ToString(), param);

                d.Delete = SqlFormatter.DeleteBlock(SqlFormatter.Table("SubverseSetList"));
                d.Where  = "\"SubverseSetID\" = @ID";
                await conn.ExecuteAsync(d.ToString(), param);

                d.Delete = SqlFormatter.DeleteBlock(SqlFormatter.Table("SubverseSet"));
                d.Where  = "\"ID\" = @ID";
                await conn.ExecuteAsync(d.ToString(), param);

                //tran.Commit();

                return(CommandResponse.FromStatus <bool?>(true, Status.Success));
            }
            catch (Exception ex)
            {
                //tran.Rollback();
                return(CommandResponse.Error <CommandResponse <bool?> >(ex));
            }
        }
Beispiel #9
0
        public async Task <ActionResult> Sidebar(string name)
        {
            //TODO: Implement Command/Query - Remove direct Repository access
            using (var repo = new Repository(User))
            {
                var domainReference = DomainReference.Parse(name, DomainType.Set);
                var set             = repo.GetSet(domainReference.Name, domainReference.OwnerName);

                if (set != null)
                {
                    return(PartialView("~/Views/Shared/Sidebars/_SidebarSet.cshtml", set));
                }
                else
                {
                    return(new EmptyResult());
                }
            }
        }
        public static bool IsUserVolatileCache(string userName, DomainReference domainReference)
        {
            bool result = false;

            if (domainReference.Type == DomainType.Subverse)
            {
                if (!String.IsNullOrEmpty(userName))
                {
                    if (
                        (domainReference.Name.IsEqual("all") || domainReference.Name.IsEqual(AGGREGATE_SUBVERSE.ALL))
                        ||
                        domainReference.Name.IsEqual(AGGREGATE_SUBVERSE.FRONT)
                        )
                    {
                        result = true;
                    }
                }
            }
            return(result);
        }
Beispiel #11
0
        public static string BasePath(DomainReference domainReference)
        {
            string basePath = "";

            switch (domainReference.Type)
            {
            case DomainType.Set:
                basePath = $"/s/{domainReference.Name}" + (!String.IsNullOrEmpty(domainReference.OwnerName) ? CONSTANTS.SET_SEPERATOR + $"{domainReference.OwnerName}" : "");
                break;

            case DomainType.Subverse:
                basePath = $"/v/{domainReference.Name}";
                break;

            case DomainType.User:
                basePath = $"/user/{domainReference.Name}";
                break;
            }
            return(basePath);
        }
Beispiel #12
0
        public async Task <ActionResult> Create(Set set)
        {
            if (!VoatSettings.Instance.SetCreationEnabled)
            {
                return(ErrorView(new ErrorViewModel()
                {
                    Title = "Set Creation Disabled", Description = "Sorry, but set creation is currently disabled", Footer = "Someone will be fired for this"
                }));
            }

            if (ModelState.IsValid)
            {
                //TODO: Implement Command/Query - Remove direct Repository access
                using (var repo = new Repository(User))
                {
                    var result = await repo.CreateOrUpdateSet(set);

                    if (result.Success)
                    {
                        Caching.CacheHandler.Instance.Remove(Caching.CachingKey.UserSubscriptions(User.Identity.Name));
                        if (Request.IsAjaxRequest())
                        {
                            return(JsonResult(result));
                        }
                        else
                        {
                            var domainReference = new DomainReference(DomainType.Set, result.Response.Name, result.Response.UserName);
                            return(new RedirectToRouteResult("SetDetails", new RouteValueDictionary()
                            {
                                { "name", domainReference.FullName }
                            }));
                        }
                    }
                    else
                    {
                        ModelState.AddModelError("", result.Message);
                    }
                }
            }
            return(View(set));
        }
        public async Task <IViewComponentResult> InvokeAsync(DomainReference domainReference)
        {
            //Use default stickies for site
            if (domainReference == null)
            {
                domainReference = new DomainReference(DomainType.Subverse, "announcements");
            }

            var q        = new QueryStickies(domainReference.Name).SetUserContext(User);
            var stickies = await q.ExecuteAsync();


            if (stickies != null)
            {
                return(View(stickies));
            }
            else
            {
                //Empty
                return(Content(string.Empty));
            }
        }
Beispiel #14
0
        public async Task <IViewComponentResult> InvokeAsync(DomainReference domainReference)
        {
            var cacheData = CacheHandler.Instance.Register("legacy:TopViewedSubmissions24Hours", new Func <object>(() =>
            {
                using (var db = new VoatOutOfRepositoryDataContextAccessor(CONSTANTS.CONNECTION_READONLY))
                {
                    var startDate = Repository.CurrentDate.Add(new TimeSpan(0, -24, 0, 0, 0));
                    IQueryable <Data.Models.Submission> submissions =
                        (from message in db.Submission
                         join subverse in db.Subverse on message.Subverse equals subverse.Name
                         where message.ArchiveDate == null && !message.IsDeleted && subverse.IsPrivate != true && subverse.IsAdminPrivate != true && subverse.IsAdult == false && message.CreationDate >= startDate && message.CreationDate <= Repository.CurrentDate
                         where !(from bu in db.BannedUser select bu.UserName).Contains(message.UserName)
                         where !subverse.IsAdminDisabled.Value
                         //where !(from ubs in _db.UserBlockedSubverses where ubs.Subverse.Equals(subverse.Name) select ubs.UserName).Contains(User.Identity.Name)
                         select message).OrderByDescending(s => s.Views).Take(5).AsQueryable();
                    //select message).OrderByDescending(s => s.Views).DistinctBy(m => m.Subverse).Take(5).AsQueryable().AsNoTracking();

                    return(submissions.ToList());
                }
            }), TimeSpan.FromMinutes(60), 5);

            return(View(cacheData));
        }
 public SubscribeCommand(DomainReference domainReference, SubscriptionAction action)
 {
     _action          = action;
     _domainReference = domainReference;
 }
Beispiel #16
0
        public async Task <ActionResult> Index(string name, string sort)
        {
            var domainReference = DomainReference.Parse(name, DomainType.Set);

            //var domainReference = new DomainReference(DomainType.Set, name, userName);

            var qSet = new QuerySet(domainReference.Name, domainReference.OwnerName);
            var set  = await qSet.ExecuteAsync();

            if (set == null)
            {
                return(ErrorView(new ErrorViewModel()
                {
                    Title = "Can't find this set", Description = "Maybe it's gone?", Footer = "Probably yeah"
                }));
            }

            var perms = SetPermission.GetPermissions(set, User.Identity);

            if (!perms.View)
            {
                return(ErrorView(new ErrorViewModel()
                {
                    Title = "Set is Private", Description = "This set doesn't allow viewing. It is private.", Footer = "Sometimes sets are shy around others."
                }));
            }


            var options = new SearchOptions(Request.QueryString.Value);

            //Set sort because it is part of path
            if (!String.IsNullOrEmpty(sort))
            {
                options.Sort = (SortAlgorithm)Enum.Parse(typeof(SortAlgorithm), sort, true);
            }
            else
            {
                //Set Default Set to Relative if no sort is provided
                if (set.Name.IsEqual("Default") && String.IsNullOrEmpty(set.UserName))
                {
                    options.Sort = SortAlgorithm.Relative;
                }
            }
            //set span to day if not specified explicitly
            if (options.Sort == SortAlgorithm.Top && !Request.Query.ContainsKey("span"))
            {
                options.Span = SortSpan.Day;
            }

            var q      = new QuerySubmissions(domainReference, options).SetUserContext(User);
            var result = await q.ExecuteAsync();

            var model = new ListViewModel <Domain.Models.Submission>();

            model.Items           = new Utilities.PaginatedList <Domain.Models.Submission>(result, options.Page, options.Count);
            model.Items.RouteName = "SetIndex";
            model.Context         = domainReference;
            model.Sort            = options.Sort;// == SortAlgorithm.RelativeRank ? SortAlgorithm.Hot :options.Sort; //UI doesn't want relative rank
            model.Span            = options.Span;

            ViewBag.NavigationViewModel = new NavigationViewModel()
            {
                Description = "Set Description Here",
                Name        = name,
                MenuType    = MenuType.Set,
                BasePath    = model.Context.BasePath(),
                Sort        = model.Sort
            };

            return(View(ViewPath(model.Context), model));
        }
Beispiel #17
0
        //Change ParentID to the actual Parent Object
        static async Task <Domain> RecusiveDomainsAdd(DomainDTO domain, DataContext db, IEnumerable <Domain> originalDomains)
        {
            var domainCheck = originalDomains.Where(x => x.ID == domain.ID).FirstOrDefault();

            if (domainCheck == null)
            {
                domainCheck = new Domain()
                {
                    ID           = Lpp.Utilities.DatabaseEx.NewGuid(),
                    DataType     = domain.DataType,
                    EnumValue    = domain.EnumValue,
                    IsMultiValue = domain.IsMultiValue,
                    Title        = domain.Title,
                };
                db.Domains.Add(domainCheck);
            }
            else
            {
                domainCheck.DataType       = domain.DataType;
                domainCheck.EnumValue      = domain.EnumValue;
                domainCheck.IsMultiValue   = domain.IsMultiValue;
                domainCheck.ParentDomainID = domain.ParentDomainID;
                domainCheck.Title          = domain.Title;
            }

            if (domain.References != null && domain.References.Count() > 0)
            {
                foreach (var reff in domain.References)
                {
                    var refCheck = domainCheck.DomainReferences.Where(x => x.ID == reff.ID).FirstOrDefault();
                    if (refCheck == null)
                    {
                        refCheck = new DomainReference()
                        {
                            ID                      = Lpp.Utilities.DatabaseEx.NewGuid(),
                            Title                   = reff.Title,
                            Description             = reff.Description,
                            DomainID                = domainCheck.ID,
                            ParentDomainReferenceID = reff.ParentDomainReferenceID
                        };
                        domainCheck.DomainReferences.Add(refCheck);
                    }
                    else
                    {
                        refCheck.Title                   = reff.Title;
                        refCheck.Description             = reff.Description;
                        refCheck.DomainID                = domainCheck.ID;
                        refCheck.ParentDomainReferenceID = reff.ParentDomainReferenceID;
                    }
                }
            }

            if (domain.ChildMetadata != null && domain.ChildMetadata.Count() > 0)
            {
                foreach (var child in domain.ChildMetadata)
                {
                    var cc = await RecusiveDomainsAdd(child, db, originalDomains);

                    cc.ParentDomainID = domainCheck.ID;
                    domainCheck.ChildrenDomains.Add(cc);
                }
            }

            //await db.SaveChangesAsync();
            return(domainCheck);
        }
Beispiel #18
0
 public QueryActiveSessionCount(DomainReference domainReference, CachePolicy policy) : base(policy)
 {
     this._domainReference = domainReference;
 }
Beispiel #19
0
 public QueryActiveSessionCount(DomainReference domainReference) : this(domainReference, new CachePolicy(TimeSpan.FromMinutes(2)))
 {
 }
Beispiel #20
0
        protected string ViewPath(DomainReference domainReference)
        {
            var isRetro = Request.IsCookiePresent("view", "retro", this.Response, TimeSpan.FromDays(7));

            return(isRetro ? VIEW_PATH.SUBMISSION_LIST_RETRO : VIEW_PATH.SUBMISSION_LIST);
        }
Beispiel #21
0
        public async Task Block_Lifecycle_Tests()
        {
            var userName = "******";
            var subName  = SUBVERSES.Unit;

            TestDataInitializer.CreateUser(userName);
            var user = TestHelper.SetPrincipal(userName);

            //Verify No Front / Blocked Sets
            var userBlockQuery   = new QueryUserBlocks(userName).SetUserContext(user);
            var userBlockResults = await userBlockQuery.ExecuteAsync();

            Assert.IsNotNull(userBlockResults, "Old McDonald had a farm ee i ee i o. And on that farm he shot some guys. Badda boom badda bing bang boom.");
            Assert.AreEqual(0, userBlockResults.Count(), "He is supposed to be Turkish. Some say his father was German. Nobody believed he was real.");

            var userSetQuery   = new QueryUserSets(userName).SetUserContext(user);
            var userSetResults = await userSetQuery.ExecuteAsync();

            Assert.IsNotNull(userSetResults, "One cannot be betrayed if one has no people.");
            Assert.AreEqual(0, userSetResults.Count(), "A man can convince anyone he's somebody else, but never himself.");

            var currentSubscriberCount = 0;

            using (var db = new VoatDataContext())
            {
                var count = db.Subverse.First(x => x.Name == subName).SubscriberCount;
                currentSubscriberCount = count.HasValue ? count.Value : 0;
            }

            //Sub a user to front
            var domainReference = new DomainReference(DomainType.Subverse, subName);
            var blockCmd        = new BlockCommand(domainReference.Type, domainReference.Name, true).SetUserContext(user);
            var blockResult     = await blockCmd.Execute();

            //Verify Front is created
            userBlockQuery   = new QueryUserBlocks(userName).SetUserContext(user);
            userBlockResults = await userBlockQuery.ExecuteAsync();

            Assert.IsNotNull(userBlockResults, "What about it, pretzel man? What's your story?");
            Assert.AreEqual(1, userBlockResults.Count(), "First day on the job, you know what I learned? How to spot a murderer.");
            Assert.IsTrue(userBlockResults.Any(x => x.Type == DomainType.Subverse && x.Name == subName), "It was Keyser Soze, Agent Kujan. I mean the Devil himself. How do you shoot the Devil in the back? What if you miss?");

            userSetQuery   = new QueryUserSets(userName).SetUserContext(user);
            userSetResults = await userSetQuery.ExecuteAsync();

            Assert.IsNotNull(userSetResults, "What the cops never figured out, and what I know now, was that these men would never break, never lie down, never bend over for anybody");
            Assert.AreEqual(1, userSetResults.Count(x => x.Type == SetType.Blocked), "Is it Friday already? ");
            var set = userSetResults.First(x => x.Type == SetType.Blocked);

            Assert.AreEqual(SetType.Blocked, set.Type, "I got a whole new problem when I post bail.");
            Assert.AreEqual(1, set.SubscriberCount, "I got a whole new problem when I post bail.");

            //Ensure Subverse Subscriber Count Updated
            using (var db = new VoatDataContext())
            {
                var tc    = db.Subverse.First(x => x.Name == subName).SubscriberCount;
                var count = tc.HasValue ? tc.Value : 0;
                Assert.AreEqual(currentSubscriberCount, count, "");
                currentSubscriberCount = count;
            }

            //verify FRONT set has sub
            using (var repo = new Voat.Data.Repository())
            {
                var setList = await repo.GetSetListDescription(SetType.Blocked.ToString(), userName);

                Assert.IsTrue(setList.Any(x => x.Name == subName));
            }

            //Unsubscribe
            blockCmd    = new BlockCommand(domainReference.Type, domainReference.Name, true).SetUserContext(user);
            blockResult = await blockCmd.Execute();

            VoatAssert.IsValid(blockResult);

            //Ensure Subverse Subscriber Count Updated
            using (var db = new VoatDataContext())
            {
                var count = db.Subverse.First(x => x.Name == subName).SubscriberCount;
                Assert.AreEqual(currentSubscriberCount, count.HasValue ? count.Value : 0, "");
            }

            //verify FRONT set has not sub
            using (var repo = new Voat.Data.Repository())
            {
                var setList = await repo.GetSetListDescription(SetType.Blocked.ToString(), userName);

                Assert.IsFalse(setList.Any(x => x.Name == subName));
            }
        }
Beispiel #22
0
        public bool IsSubscriber(DomainReference domainReference)
        {
            var subs = GetSubscriptions(domainReference.Type);

            return(subs.Any(x => x.IsEqual(domainReference.FullName)));
        }
Beispiel #23
0
        public async Task <ActionResult> Details(string name)
        {
            //TODO: Implement Command/Query - Remove direct Repository access
            using (var repo = new Repository(User))
            {
                var domainReference = DomainReference.Parse(name, DomainType.Set);
                var set             = repo.GetSet(domainReference.Name, domainReference.OwnerName);
                if (set == null)
                {
                    //Since system sets are not created until needed we show a slightly better error message for front/blocked.
                    if (name.IsEqual(SetType.Front.ToString()))
                    {
                        ViewBag.NavigationViewModel = new Models.ViewModels.NavigationViewModel()
                        {
                            Description = "Discover Search",
                            Name        = "No Idea",
                            MenuType    = Models.ViewModels.MenuType.Discovery,
                            BasePath    = VoatUrlFormatter.BasePath(domainReference),
                            Sort        = null
                        };
                        return(ErrorView(new ErrorViewModel()
                        {
                            Title = "No Subscriptions!", Description = "You don't have any subscriptions so we have to show you this instead", Footer = "Subscribe to a subverse you silly goat"
                        }));
                    }
                    else if (name.IsEqual(SetType.Blocked.ToString()))
                    {
                        ViewBag.NavigationViewModel = new Models.ViewModels.NavigationViewModel()
                        {
                            Description = "Discover Search",
                            Name        = "No Idea",
                            MenuType    = Models.ViewModels.MenuType.Discovery,
                            BasePath    = VoatUrlFormatter.BasePath(domainReference),
                            Sort        = null
                        };
                        return(ErrorView(new ErrorViewModel()
                        {
                            Title = "No Blocked Subs!", Description = "You don't have any blocked subs. Golf clap.", Footer = "Block some subs and this page will magically change!"
                        }));
                    }
                    else
                    {
                        return(ErrorView(new ErrorViewModel()
                        {
                            Title = "Can't find this set", Description = "Maybe it's gone?", Footer = "Probably yeah"
                        }));
                    }
                }

                var perms = SetPermission.GetPermissions(set.Map(), User.Identity);

                if (!perms.View)
                {
                    return(ErrorView(new ErrorViewModel()
                    {
                        Title = "Set is Private", Description = "This set doesn't allow the viewing of its properties", Footer = "It's ok, I can't see it either"
                    }));
                }

                var options = new SearchOptions(Request.QueryString.Value);
                options.Count = 50;

                var setList = await repo.GetSetListDescription(set.ID, options.Page);

                var model = new SetViewModel();
                model.Permissions    = perms;
                model.Set            = set.Map();
                model.List           = new PaginatedList <Domain.Models.SubverseSubscriptionDetail>(setList, options.Page, options.Count);
                model.List.RouteName = "SetDetails";

                ViewBag.NavigationViewModel = new NavigationViewModel()
                {
                    Name        = domainReference.FullName,
                    Description = set.Description,
                    BasePath    = VoatUrlFormatter.BasePath(domainReference),
                    MenuType    = (set.Type == (int)SetType.Front || set.Type == (int)SetType.Blocked ?  MenuType.Discovery : MenuType.Set)
                };
                return(View("Details", model));
            }
        }
 public QuerySubmissions(DomainReference domainReference, SearchOptions options, CachePolicy policy) : base(policy)
 {
     this._options         = options;
     this._domainReference = domainReference;
 }
 public QuerySubmissions(DomainReference domainReference, SearchOptions options) : this(domainReference, options, CachePolicy.None)
 {
 }
 public SetSubverseCommand(DomainReference setRef, string subverse, SubscriptionAction action = SubscriptionAction.Toggle)
 {
     _setRef   = setRef;
     _action   = action;
     _subverse = subverse;
 }
Beispiel #27
0
 public static string ActiveSessionCount(DomainReference domainReference)
 {
     return(String.Format("ActiveSessionCount:{0}:{1}", domainReference.Type, domainReference.Name));
 }