本文整理汇总了C#中Content.getProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Content.getProperty方法的具体用法?C# Content.getProperty怎么用?C# Content.getProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Content
的用法示例。
在下文中一共展示了Content.getProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: updateContentProperty
private void updateContentProperty(XmlNode uploadFieldConfigNode, Content content, string propertyAlias,
object propertyValue)
{
XmlNode propertyNode = uploadFieldConfigNode.SelectSingleNode(propertyAlias);
if (propertyNode != null && !String.IsNullOrEmpty(propertyNode.FirstChild.Value))
{
if (content.getProperty(propertyNode.FirstChild.Value) != null)
{
content.getProperty(propertyNode.FirstChild.Value)
.Value = propertyValue;
}
}
}
示例2: FillProperties
private void FillProperties(IImagingAutoFillUploadField uploadFieldConfigNode, Content content, UmbracoFile um)
{
var prop = content.getProperty(uploadFieldConfigNode.WidthFieldAlias);
if (prop != null)
prop.Value = um.SupportsResizing ? um.GetDimensions().Item1.ToString() : string.Empty;
prop = content.getProperty(uploadFieldConfigNode.HeightFieldAlias);
if (prop != null)
prop.Value = um.SupportsResizing ? um.GetDimensions().Item2.ToString() : string.Empty;
prop = content.getProperty(uploadFieldConfigNode.LengthFieldAlias);
if (prop != null)
prop.Value = um.Length;
prop = content.getProperty(uploadFieldConfigNode.ExtensionFieldAlias);
if (prop != null)
prop.Value = um.Extension;
}
示例3: UpdateContentProperty
private static void UpdateContentProperty(XmlNode uploadFieldConfigNode, Content content, string propertyAlias,
object propertyValue)
{
XmlNode propertyNode = uploadFieldConfigNode.SelectSingleNode(propertyAlias);
if (propertyNode != null && !string.IsNullOrEmpty(propertyNode.FirstChild.Value))
{
var prop = content.getProperty(propertyNode.FirstChild.Value);
if (prop != null)
{
prop.Value = propertyValue;
}
}
}