Example #1
0
 public void NoDefaultConstructor()
 {
     Assert.ThrowsException <TypeInitializationException>(() => Ambient.GetService <INoDefaultConstructor>());
 }
Example #2
0
 public void NonInterfaceType()
 {
     AmbientService <DefaultTest> defaultTest = Ambient.GetService <DefaultTest>();
     DefaultTest test = defaultTest.Global;
 }
Example #3
0
    static SetupApplication()
    {
        AmbientService <IAmbientSettingsSet> SettingsSet = Ambient.GetService <IAmbientSettingsSet>();

        SettingsSet.Global = new AppConfigAmbientSettings();
    }