public EditableFrameworkReferenceGroup(FrameworkReferenceGroup frameworkReferenceGroup)
 {
     if (frameworkReferenceGroup is null)
     {
         throw new System.ArgumentNullException(nameof(frameworkReferenceGroup));
     }
     _targetFramework    = frameworkReferenceGroup.TargetFramework;
     FrameworkReferences = new ObservableCollection <string>(frameworkReferenceGroup.FrameworkReferences.Select(fr => fr.Name));
 }
        public void FrameworkReferenceGroup_EqualsAndHashCode_AccountForTargetFramework()
        {
            var frameworkReference1 = new FrameworkReference("ASPNET");
            var frameworkReference2 = new FrameworkReference("WPF");

            var frameworkReferenceGroup1 = new FrameworkReferenceGroup(CommonFrameworks.NetCoreApp30, new FrameworkReference[] { frameworkReference1, frameworkReference2 });
            var frameworkReferenceGroup2 = new FrameworkReferenceGroup(CommonFrameworks.NetCoreApp22, new FrameworkReference[] { frameworkReference1, frameworkReference2 });

            Assert.NotEqual(frameworkReferenceGroup1, frameworkReferenceGroup2);
            Assert.NotEqual(frameworkReferenceGroup1.GetHashCode(), frameworkReferenceGroup2.GetHashCode());
        }
示例#3
0
 public EditableFrameworkReferenceGroup(FrameworkReferenceGroup frameworkReferenceGroup)
 {
     _targetFramework    = frameworkReferenceGroup.TargetFramework;
     FrameworkReferences = new ObservableCollection <string>(frameworkReferenceGroup.FrameworkReferences.Select(fr => fr.Name));
 }