The configuration for the object printer.
Esempio n. 1
0
        /// <summary>
        /// Create an state printer using the supplied configuration.
        /// </summary>
        public Stateprinter(Configuration configuration)
        {
            if (configuration == null)
                throw new ArgumentNullException("configuration");

            this.Configuration = configuration;
        }
Esempio n. 2
0
        public void TryFind()
        {
            var config = new Configuration();
            config.Add(new StandardTypesConverter(null));

            IValueConverter h;
            Assert.IsTrue(config.TryGetValueConverter(typeof(decimal), out h));
            Assert.IsTrue(h is StandardTypesConverter);
        }
Esempio n. 3
0
        public void SettingNullValues()
        {
            var sut = new Configuration();
            Assert.Throws<ArgumentNullException>(() => sut.SetCulture(null));
            Assert.Throws<ArgumentNullException>(() => sut.SetIndentIncrement(null));
            Assert.Throws<ArgumentNullException>(() => sut.SetNewlineDefinition(null));
            Assert.Throws<ArgumentNullException>(() => sut.SetOutputFormatter(null));
            Assert.Throws<ArgumentNullException>(() => sut.SetAreEqualsMethod(null));

            Assert.Throws<ArgumentNullException>(() => sut.Add((IFieldHarvester)null));
            Assert.Throws<ArgumentNullException>(() => sut.Add((IValueConverter)null));

            Assert.Throws<ArgumentNullException>(() => sut.Test.SetAreEqualsMethod(null));
            Assert.Throws<ArgumentNullException>(() => sut.Test.SetAutomaticTestRewrite(null));
        }
 public StandardTypesConverter(Configuration configuration)
 {
     this.configuration = configuration;
 }
Esempio n. 5
0
 public CurlyBraceStyle(Configuration configuration)
 {
     this.configuration = configuration;
 }
Esempio n. 6
0
 public XmlStyle(Configuration configuration)
 {
     this.configuration = configuration;
 }
Esempio n. 7
0
 public TestingBehaviour(Configuration configuration)
 {
     this.configuration = configuration;
 }
Esempio n. 8
0
 public JsonStyle(Configuration configuration)
 {
     this.configuration = configuration;
 }
 public IndentingStringBuilder(Configuration configuration)
 {
     IndentIncrement = configuration.IndentIncrement;
     NewLineDefinition = configuration.NewLineDefinition;
     this.configuration = configuration;
 }
Esempio n. 10
0
 public DateTimeConverter(Configuration configuration)
 {
     this.configuration = configuration;
 }