コード例 #1
0
        public override bool Equals(System.Object obj)
        {
            XmlSetBrightnessBrick b = obj as XmlSetBrightnessBrick;

            if ((object)b == null)
            {
                return(false);
            }

            return(this.Equals(b) && this.Brightness.Equals(b.Brightness));
        }
コード例 #2
0
        public void XmlSetBrightnessBrickTest()
        {
            TextReader sr = new StringReader("<brick type=\"SetBrightnessBrick\">  <formulaList>  <formula category=\"BRIGHTNESS\">  <type>NUMBER</type>  <value>50.0</value>  </formula>  </formulaList>  </brick>");
            var xRoot = XElement.Load(sr);

            var testObject = new XmlSetBrightnessBrick(xRoot);

            var referenceObject = new XmlSetBrightnessBrick()
            {
                Brightness = new XmlFormula(xRoot, XmlConstants.Brightness),
            };

            Assert.AreEqual(referenceObject, testObject);
        }
コード例 #3
0
 public bool Equals(XmlSetBrightnessBrick b)
 {
     return this.Equals((XmlBrick)b) && this.Brightness.Equals(b.Brightness);
 }
コード例 #4
0
 public bool Equals(XmlSetBrightnessBrick b)
 {
     return(this.Equals((XmlBrick)b) && this.Brightness.Equals(b.Brightness));
 }