Ejemplo n.º 1
0
        /// <summary>
        /// Returns a <see cref="System.String"/> that represents this instance.
        /// </summary>
        /// <returns>
        /// A <see cref="System.String"/> that represents this instance.
        /// </returns>
        public override string ToString()
        {
            StringBuilder toolTipInfo = new StringBuilder();

            toolTipInfo.AppendLine(string.Format("Resource Id: {0}", Id.ToString()));
            toolTipInfo.AppendLine(string.Format("Name: {0}", Name));
            if (!string.IsNullOrEmpty(TypeName))
            {
                toolTipInfo.AppendLine(string.Format("Type Name: {0}", TypeName));
            }
            else
            {
                toolTipInfo.AppendLine(string.Format("Type Id: {0}", TypeId.ToString()));
            }
            if (!string.IsNullOrEmpty(SolutionName))
            {
                toolTipInfo.AppendLine(string.Format("Solution Name: {0}", SolutionName));
            }
            else
            {
                toolTipInfo.AppendLine(string.Format("Solution Id: {0}", SolutionId.ToString()));
            }
            if (!string.IsNullOrEmpty(TenantName))
            {
                toolTipInfo.AppendLine(string.Format("Tenant Name: {0}", TenantName));
            }
            else
            {
                toolTipInfo.AppendLine(string.Format("Tenant Id: {0}", TenantId.ToString()));
            }

            return(toolTipInfo.ToString());
        }
Ejemplo n.º 2
0
        public override List <KeyValuePair <string, string> > GetAsPropertyList()
        {
            var propList = new List <KeyValuePair <string, string> >();

            propList.Add(new KeyValuePair <string, string>(nameof(Title), Title));
            propList.Add(new KeyValuePair <string, string>(nameof(Name), Name));
            propList.Add(new KeyValuePair <string, string>(nameof(CompatibilityLevel), CompatibilityLevel.ToString()));
            propList.Add(new KeyValuePair <string, string>(nameof(Description), Description));
            propList.Add(new KeyValuePair <string, string>(nameof(Hidden), Hidden.ToString()));
            propList.Add(new KeyValuePair <string, string>(nameof(SolutionId), SolutionId.ToString()));
            propList.Add(new KeyValuePair <string, string>(nameof(UIVersion), UIVersion.ToString()));
            propList.Add(new KeyValuePair <string, string>(nameof(Version), Version == null ? string.Empty : Version.ToString()));
            propList.Add(new KeyValuePair <string, string>(nameof(DefinitionInstallationScope), DefinitionInstallationScope));
            propList.Add(new KeyValuePair <string, string>(nameof(Properties), Common.StringUtilities.PropertiesToString(Properties)));

            propList.AddRange(GetAsPropertyList(true));

            return(propList);
        }