Exemplo n.º 1
0
 private static void MakeTheStackLookMoreImpressive(SomeClass root)
 {
     if (root != null)
     {
         ByAddingMoreLayers(root);
     }
 }
Exemplo n.º 2
0
 private static void ByAddingMoreLayers(SomeClass root)
 {
     if (root.Foo.Value == null || root.Bar.Value.ToString() == "foo" || root.Baz.Value != null)
     {
         Console.WriteLine("The code inside the block.");
     }
 }
Exemplo n.º 3
0
        private static SomeClass MakeInstance()
        {
            var root = new SomeClass()
            {
                Foo = new SomePropertyType() { Value = DateTime.Now },
                Bar = new SomePropertyType() { Value = null },
                Baz = new SomePropertyType() { Value = new SomePropertyType() }
            };

            return root;
        }