/// <summary>
 /// Deserializes xml markup from file into an ApplicablePlatformsType object
 /// </summary>
 /// <param name="fileName">string xml file to load and deserialize</param>
 /// <param name="obj">Output ApplicablePlatformsType object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
 public static bool LoadFromFile(string fileName, out ApplicablePlatformsType obj, out Exception exception)
 {
     exception = null;
     obj       = default(ApplicablePlatformsType);
     try
     {
         obj = LoadFromFile(fileName);
         return(true);
     }
     catch (Exception ex)
     {
         exception = ex;
         return(false);
     }
 }
 /// <summary>
 /// Deserializes ApplicablePlatformsType object
 /// </summary>
 /// <param name="input">string workflow markup to deserialize</param>
 /// <param name="obj">Output ApplicablePlatformsType object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
 public static bool Deserialize(string input, out ApplicablePlatformsType obj, out Exception exception)
 {
     exception = null;
     obj       = default(ApplicablePlatformsType);
     try
     {
         obj = Deserialize(input);
         return(true);
     }
     catch (Exception ex)
     {
         exception = ex;
         return(false);
     }
 }
示例#3
0
 /// <summary>
 /// WeaknessType class constructor
 /// </summary>
 public WeaknessType()
 {
     Content_History         = new ContentHistoryType();
     Notes                   = new List <NotesTypeNote>();
     References              = new List <ReferencesTypeReference>();
     Related_Attack_Patterns = new List <RelatedAttackPatternsTypeRelated_Attack_Pattern>();
     Taxonomy_Mappings       = new List <TaxonomyMappingsTypeTaxonomy_Mapping>();
     Affected_Resources      = new List <ResourceEnumeration>();
     Functional_Areas        = new List <FunctionalAreaEnumeration>();
     Observed_Examples       = new List <ObservedExampleTypeObserved_Example>();
     Demonstrative_Examples  = new List <DemonstrativeExamplesTypeDemonstrative_Example>();
     Potential_Mitigations   = new List <PotentialMitigationsTypeMitigation>();
     Detection_Methods       = new List <DetectionMethodsTypeDetection_Method>();
     Common_Consequences     = new List <CommonConsequencesTypeConsequence>();
     Exploitation_Factors    = new List <StructuredTextType>();
     Modes_Of_Introduction   = new List <ModesOfIntroductionTypeIntroduction>();
     Alternate_Terms         = new List <AlternateTermsTypeAlternate_Term>();
     Background_Details      = new List <StructuredTextType>();
     Applicable_Platforms    = new ApplicablePlatformsType();
     Weakness_Ordinalities   = new List <WeaknessOrdinalitiesTypeWeakness_Ordinality>();
     Related_Weaknesses      = new List <RelatedWeaknessesTypeRelated_Weakness>();
     Extended_Description    = new StructuredTextType();
 }
        public static bool LoadFromFile(string fileName, out ApplicablePlatformsType obj)
        {
            Exception exception = null;

            return(LoadFromFile(fileName, out obj, out exception));
        }
        public static bool Deserialize(string input, out ApplicablePlatformsType obj)
        {
            Exception exception = null;

            return(Deserialize(input, out obj, out exception));
        }