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

        SettingsSet.Global = new AppConfigAmbientSettings();
    }