Пример #1
0
        public ZipDownloader(int projectId)
        {
            var project = new umbraco.NodeFactory.Node(projectId);
            var githubRepo = project.GetProperty("documentationGitRepo");
            var xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(string.Format("<?xml version=\"1.0\"?><configuration><sources><add url=\"{0}/zipball/master\" folder=\"\" /></sources></configuration>", githubRepo));

            Configuration = xmlDocument;
            RootFolder = HostingEnvironment.MapPath(@"~" + project.Url.Replace("/", @"\") + @"\Documentation");
            IsProjectDocumentation = true;
        }
Пример #2
0
        public ZipDownloader(int projectId)
        {
            var project     = new umbraco.NodeFactory.Node(projectId);
            var githubRepo  = project.GetProperty("documentationGitRepo");
            var xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(string.Format("<?xml version=\"1.0\"?><configuration><sources><add url=\"{0}/zipball/master\" folder=\"\" /></sources></configuration>", githubRepo));

            Configuration          = xmlDocument;
            RootFolder             = HostingEnvironment.MapPath(@"~" + project.Url.Replace("/", @"\") + @"\Documentation");
            IsProjectDocumentation = true;
        }
Пример #3
0
        /// <summary>
        /// Return the property value for the current shopalias
        /// </summary>
        /// <param name="nodeId">The node unique identifier.</param>
        /// <param name="propertyAlias">The property alias.</param>
        /// <returns></returns>
        public static string GetPropertyValueForCurrentShop(int nodeId, string propertyAlias)
        {
            var store = StoreHelper.GetCurrentStore();

            propertyAlias = StoreHelper.CreateMultiStorePropertyAlias(propertyAlias, store.Alias);

            var node = new umbraco.NodeFactory.Node(nodeId);

            var property = node.GetProperty(propertyAlias);

            return(property == null ? string.Empty : property.Value);
        }
Пример #4
0
		/// <summary>
		/// Return the property value for the current shopalias
		/// </summary>
		/// <param name="nodeId">The node unique identifier.</param>
		/// <param name="propertyAlias">The property alias.</param>
		/// <returns></returns>
		public static string GetPropertyValueForCurrentShop(int nodeId, string propertyAlias)
		{
			var store = StoreHelper.GetCurrentStore();

			propertyAlias = StoreHelper.CreateMultiStorePropertyAlias(propertyAlias, store.Alias);

			var node = new umbraco.NodeFactory.Node(nodeId);

			var property = node.GetProperty(propertyAlias);

			return property == null ? string.Empty : property.Value;
		}
        private static string getPropertyValue(umbraco.NodeFactory.Node node, string alias)
        {
            var property = (umbraco.NodeFactory.Property)node.GetProperty(alias);

            return(property == null ? string.Empty : property.Value);
        }