本文整理汇总了C#中ExceptionlessConfiguration.ReadFromAttributes方法的典型用法代码示例。如果您正苦于以下问题:C# ExceptionlessConfiguration.ReadFromAttributes方法的具体用法?C# ExceptionlessConfiguration.ReadFromAttributes怎么用?C# ExceptionlessConfiguration.ReadFromAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExceptionlessConfiguration
的用法示例。
在下文中一共展示了ExceptionlessConfiguration.ReadFromAttributes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanReadFromAttributes
public void CanReadFromAttributes() {
var config = new ExceptionlessConfiguration(DependencyResolver.CreateDefault());
Assert.Null(config.ApiKey);
Assert.Equal("https://collector.exceptionless.io", config.ServerUrl);
Assert.Equal(0, config.Settings.Count);
config.ReadFromAttributes(typeof(ConfigurationTests).Assembly);
Assert.Equal("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", config.ApiKey);
Assert.Equal("http://localhost:45000", config.ServerUrl);
Assert.Equal(1, config.Settings.Count);
Assert.Equal("configuration", config.Settings["testing"]);
}
示例2: CanReadFromAttributes
public void CanReadFromAttributes() {
var config = new ExceptionlessConfiguration(DependencyResolver.CreateDefault());
Assert.Null(config.ApiKey);
Assert.Equal("https://collector.exceptionless.com", config.ServerUrl);
Assert.True(config.EnableSSL);
Assert.Equal(0, config.Settings.Count);
config.ReadFromAttributes(typeof(ConfigurationTests).Assembly);
Assert.Equal("e3d51ea621464280bbcb79c11fd6483e", config.ApiKey);
Assert.Equal("http://localhost:45000", config.ServerUrl);
Assert.False(config.EnableSSL);
Assert.Equal(1, config.Settings.Count);
Assert.Equal("configuration", config.Settings["testing"]);
}