//todo: for debugging. delete
        public String GetAvailableResolutionsDescription()
        {
            String result = String.Empty;
            FailureDefinitionAccessor fa = GetCorrespondingFailureDefinitionAccessor();

            foreach (var fRT in fa.GetApplicableResolutionTypes())
            {
                result += "***" + fa.GetResolutionCaption(fRT) + " (" + fRT + ")***\n";
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Extension method to return a List of all FailureResolutionTypes encapsulated as FailureResolutionOptions
        /// </summary>
        /// <param name="fda"></param>
        /// <returns></returns>
        public static List <FailureResolutionOption> GetRevitFailureResolutionOptions(this FailureDefinitionAccessor fda)
        {
            List <FailureResolutionOption> result = new List <FailureResolutionOption>();

            foreach (FailureResolutionType frt in fda.GetApplicableResolutionTypes())
            {
                result.Add(new RevitResolution()
                {
                    Resolution      = frt,
                    FriendlyCaption = fda.GetResolutionCaption(frt) + " (" + frt + ")",
                    //todo: add FriendlyDescriptions for all the FailureResolutionTypes
                    FriendlyDescription = "Revit Internal Name: " + frt.ToString() + "\nRevit Caption: " + fda.GetResolutionCaption(frt)
                });
            }

            return(result);
        }