Ejemplo n.º 1
0
 /// <summary>
 /// Get the .NET 4.0 profiles.
 /// </summary>
 private static DotNetProfiles Get40Profiles(
     RegistryKeyBase key,
     RegistryDetection detection
     )
 {
     return(detection.FullProfileDetected ?
            DotNetProfiles.ClientFull :
            DotNetProfiles.Client);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the .NET service packs.
        /// </summary>
        internal static IEnumerable <Version> GetServicePacks(
            RegistryKeyBase key,
            RegistryDetection detection
            )
        {
            var keyName = detection.FullProfileRegistryKeyName;

            return(GetServicePacks(key, keyName, "SP"));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get the .NET 3.0 service packs.
        /// </summary>
        private static IEnumerable <Version> Get3ServicePack(
            RegistryKeyBase key,
            RegistryDetection detection
            )
        {
            var parentKeyName = RegistryKeyBase.GetParentName(
                key.Hive,
                detection.FullProfileRegistryKeyName
                );

            if (!key.MatchRegistryValue(parentKeyName, "Install", 1))
            {
                return(new Version[0]);
            }
            return(GetServicePacks(key, parentKeyName, "SP"));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Get the .NET 4.0 profiles.
 /// </summary>
 private static DotNetProfiles Get40Profiles(
     RegistryKeyBase key,
     RegistryDetection detection
     )
 {
     return detection.FullProfileDetected ?
         DotNetProfiles.ClientFull :
         DotNetProfiles.Client;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Get the .NET 3.0 service packs.
 /// </summary>
 private static IEnumerable<Version> Get3ServicePack(
     RegistryKeyBase key,
     RegistryDetection detection
     )
 {
     var parentKeyName = RegistryKeyBase.GetParentName(
         key.Hive,
         detection.FullProfileRegistryKeyName
     );
     if (!key.MatchRegistryValue(parentKeyName, "Install", 1))
     {
         return new Version[0];
     }
     return GetServicePacks(key, parentKeyName, "SP");
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Get the .NET service packs.
 /// </summary>
 internal static IEnumerable<Version> GetServicePacks(
     RegistryKeyBase key,
     RegistryDetection detection
     )
 {
     var keyName = detection.FullProfileRegistryKeyName;
     return GetServicePacks(key, keyName, "SP");
 }
        public void ValidateSpecification_NoKeyName_Exception()
        {
            // Fixture setup...
            var detection = new RegistryDetection();

            // Exercise and verify SUT...
            detection.Validate();

            // Fixture teardown by GC...
        }
        public void ValidateSpecification_NoFullProfilValue_Exception()
        {
            // Fixture setup...
            var detection = new RegistryDetection
            {
                FullProfileRegistryKeyName = "keyName",
                FullProfileValueName = "valueName"
            };

            // Exercise and verify SUT...
            detection.Validate();

            // Fixture teardown by GC...
        }
        public void ValidateSpecification_AllFullProps_Valid()
        {
            // Fixture setup...
            var detection = new RegistryDetection
            {
                FullProfileRegistryKeyName = "keyName",
                FullProfileValueName = "valueName",
                FullProfileValue = "value",
                VersionBuilder = new DotNetVersionBuilder()
            };

            // Exercise and verify SUT...
            detection.Validate();

            // Fixture teardown by GC...
        }