Beispiel #1
0
        public void TestNodeOutputDataInDifferentCulture()
        {
            var frCulture = CultureInfo.CreateSpecificCulture("fr-FR");

            var currentCulture   = Thread.CurrentThread.CurrentCulture;
            var currentUICulture = Thread.CurrentThread.CurrentUICulture;

            Thread.CurrentThread.CurrentCulture   = frCulture;
            Thread.CurrentThread.CurrentUICulture = frCulture;

            NodeOutputData outputData1 = new NodeOutputData();

            outputData1.InitialValue = "1.23";
            NodeOutputData outputData2 = new NodeOutputData();

            outputData2.InitialValue = "123";
            Assert.IsFalse(outputData1.Equals(outputData2));

            outputData2.InitialValue = "1.23";
            Assert.IsTrue(outputData1.Equals(outputData2));


            Thread.CurrentThread.CurrentCulture   = currentCulture;
            Thread.CurrentThread.CurrentUICulture = currentUICulture;
        }
        public NodePreset(NodeModel nodeModel) : this()
        {
            if (nodeModel == null)
            {
                throw new ArgumentNullException(nameof(nodeModel));
            }

            this.Id         = nodeModel.GUID.ToString();
            this.NodeType   = nodeModel.NodeType;
            this.InputData  = nodeModel.InputData;
            this.OutputData = nodeModel.OutputData;
        }