示例#1
0
 public void FireContextEvent(SPSiteInstance instance)
 {
     if (instance != null)
     {
         m_eventReceiverDefinition.FireContextEvent(instance.Site);
     }
 }
        public bool IsLoginValid(SPSiteInstance site, string loginName)
        {
            if (site == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "A site must be specified as the first parameter.");
            }

            return(SPUtility.IsLoginValid(site.Site, loginName));
        }
        public string GetFullUrl(SPSiteInstance site, string webUrl)
        {
            if (site == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "A site must be specified as the first parameter.");
            }

            return(SPUtility.GetFullUrl(site.Site, webUrl));
        }
        public SPAuditQueryInstance Construct(SPSiteInstance site)
        {
            if (site == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "A site must be specified.");
            }

            return(new SPAuditQueryInstance(this.InstancePrototype, new SPAuditQuery(site.Site)));
        }
        public ObjectInstance GetFullNameFromLoginEx2(SPSiteInstance site, string loginName)
        {
            if (site == null)
            {
                throw new JavaScriptException(this.Engine, "Error", "A site must be specified as the first parameter.");
            }


            bool isDl;
            var  fullName = SPUtility.GetFullNameFromLoginEx(site.Site, loginName, out isDl);

            var result = this.Engine.Object.Construct();

            result.SetPropertyValue("fullName", fullName, false);
            result.SetPropertyValue("isDL", isDl, false);
            return(result);
        }