/// <summary> /// Initializes a new instance of the <see cref="OrganizationChartPortlet"/> class. /// </summary> public OrganizationChartPortlet() { this.Name = "$OrganizationChart:PortletDisplayName"; this.Description = "$OrganizationChart:PortletDescription"; this.Category = new PortletCategory(PortletCategoryType.Collection); this.Renderer = "/Root/System/SystemPlugins/Portlets/OrganizationChart/OrgChartView.xslt"; //remove the xml/xslt fields from the hidden collection this.HiddenProperties.RemoveAll(s => XmlFields.Contains(s)); }
/// <summary> /// Initializes a new instance of the <see cref="OrganizationChartPortlet"/> class. /// </summary> public OrganizationChartPortlet() { this.Name = SenseNetResourceManager.Current.GetString("OrganizationChart", "PortletTitle"); this.Description = SenseNetResourceManager.Current.GetString("OrganizationChart", "PortletDescription"); this.Category = new PortletCategory(PortletCategoryType.Collection); this.Renderer = "/Root/System/SystemPlugins/Portlets/OrganizationChart/OrgChartView.xslt"; //remove the xml/xslt fields from the hidden collection this.HiddenProperties.RemoveAll(s => XmlFields.Contains(s)); }
// Constructors /////////////////////////////////////////////////// public ContentCollectionPortlet() { Name = "$ContentCollectionPortlet:PortletDisplayName"; Description = "$ContentCollectionPortlet:PortletDescription"; Category = new PortletCategory(PortletCategoryType.Collection); //remove the xml/xslt fields from the hidden collection this.HiddenProperties.RemoveAll(s => XmlFields.Contains(s)); Cacheable = true; // by default, any contentcollection portlet is cached (for visitors) CacheByParams = true; // by default, params are also included -> this is useful for collections with paging }
public static XmlFieldCollection FromApi(XmlFields xmlFields) { XmlFieldCollection xmlFieldCollection = new XmlFieldCollection(); foreach (SourceCode.Workflow.Client.XmlField xmlField in xmlFields) { if (xmlField != null) { XmlField item = new XmlField { Name = xmlField.Name, Value = xmlField.Value }; xmlFieldCollection.Add(item); } } return(xmlFieldCollection); }
public void ToApi(XmlFields xmlFields) { Dictionary <string, XmlField> dictionary = new Dictionary <string, XmlField>(xmlFields.Count); foreach (XmlField xmlField in xmlFields) { if (xmlField != null) { dictionary.Add(xmlField.Name, xmlField); } } foreach (XmlField current in this) { if (current != null) { XmlField xmlField2; if (!dictionary.TryGetValue(current.Name, out xmlField2)) { throw new InvalidOperationException(string.Format("Field not Found", current.Name)); } xmlField2.Value = current.Value; } } }