SenseNet.ContentRepository.GenericContent.GetProperty C# (CSharp) Метод

GetProperty() публичный Метод

public GetProperty ( string name ) : object
name string
Результат object
        public virtual object GetProperty(string name)
        {
            switch (name)
            {
                case "DisplayName":
                    return this.DisplayName;
                case "Hidden":
                    return this.Hidden;
                case "TrashDisabled":
                    return this.TrashDisabled;
                case VERSIONINGMODE:
                    return this.VersioningMode;
                case "InheritableVersioningMode":
                    return this.InheritableVersioningMode;
                case "ApprovingMode":
                    return this.ApprovingMode;
                case "InheritableApprovingMode":
                    return this.InheritableApprovingMode;
                case ALLOWEDCHILDTYPES:
                    return this.AllowedChildTypes;
                case "EnableLifespan":
                    return this.EnableLifespan;
                case "ValidFrom":
                    return this.ValidFrom;
                case "ValidTill":
                    return this.ValidTill;
                case "Workspace":
                    return this.Workspace;
                case "WorkspaceName":
                    return this.WorkspaceName;
                case "WorkspacePath":
                    return this.WorkspacePath;
                case "WorkspaceTitle":
                    return this.WorkspaceTitle;
                case "BrowseApplication":
                    return this.BrowseApplication;
                case "Approvable":
                    return this.Approvable;
                case "Publishable":
                    return this.Publishable;
                case "Versions":
                    return this.Versions;
                case "CheckedOutTo":
                    return this.CheckedOutTo;
                default:
                    return base[name];
            }
        }
        public virtual void SetProperty(string name, object value)

Usage Example

 protected string GetProperty(GenericContent content, string propertyName)
 {
     if (content == null)
         return string.Empty;
     var value = content.GetProperty(propertyName);
     return value == null ? string.Empty : value.ToString();
 }
All Usage Examples Of SenseNet.ContentRepository.GenericContent::GetProperty