void GetFrameworkVersion(XDocument xDocument)
 {
     FrameworkVersionAsString = xDocument.BuildDescendants("TargetFrameworkVersion")
         .Select(c => c.Value)
         .First();
     FrameworkVersionAsNumber = decimal.Parse(FrameworkVersionAsString.Remove(0, 1), CultureInfo.InvariantCulture);
 }
 static bool GetIsSilverlight(XDocument xDocument)
 {
     var targetFrameworkIdentifier = xDocument.BuildDescendants("TargetFrameworkIdentifier")
         .Select(c => c.Value)
         .FirstOrDefault();
     return (string.Equals(targetFrameworkIdentifier, "Silverlight", StringComparison.OrdinalIgnoreCase));
 }
 void GetTargetFrameworkIdentifier(XDocument xDocument)
 {
     var targetFrameworkIdentifier = xDocument.BuildDescendants("TargetFrameworkIdentifier")
         .Select(c => c.Value)
         .FirstOrDefault();
     if (string.Equals(targetFrameworkIdentifier, "Silverlight", StringComparison.OrdinalIgnoreCase))
     {
         IsSilverlight = true;
     }
 }
Beispiel #4
0
 static bool ContainsEmbedTask(XDocument xDocument)
 {
     try
     {
         return xDocument.BuildDescendants("Costura.EmbedTask").Any();
     }
     catch (Exception exception)
     {
         throw new Exception("Could not check project for Costura.EmbedTask", exception);
     }
 }
Beispiel #5
0
 public bool Check(XDocument xDocument)
 {
     try
     {
         if (xDocument.BuildDescendants("Fody.WeavingTask").Any())
         {
             return true;
         }
         return xDocument.BuildDescendants("Import")
             .Any(x =>
                      {
                          var xAttribute = x.Attribute("Project");
                          return xAttribute != null && xAttribute.Value.EndsWith("Fody.targets");
                      });
     }
     catch (Exception exception)
     {
         throw new Exception("Could not check project for weaving task.", exception);
     }
 }
 static bool ContainsWeavingTask(XDocument xDocument)
 {
     try
     {
         return xDocument.BuildDescendants("NotifyPropertyWeaverMsBuildTask.WeavingTask").Any();
     }
     catch (Exception exception)
     {
         throw new Exception("Could not check project for weaving task.", exception);
     }
 }
 static string GetTargetFrameworkProfile(XDocument xDocument)
 {
     return xDocument.BuildDescendants("TargetFrameworkProfile")
         .Select(c => c.Value)
         .FirstOrDefault();
 }
 void GetTargetFrameworkProfile(XDocument xDocument)
 {
     TargetFrameworkProfile = xDocument.BuildDescendants("TargetFrameworkProfile")
         .Select(c => c.Value)
         .FirstOrDefault();
 }