Skip to content

Commit 5722e81

Browse files
committed
Added config files
1 parent 5b5e20b commit 5722e81

File tree

8 files changed

+63
-81
lines changed

8 files changed

+63
-81
lines changed

Common/Common.csproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<AssemblyName>Common</AssemblyName>
1212
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<DebugSymbols>true</DebugSymbols>
@@ -35,6 +36,7 @@
3536
<Private>True</Private>
3637
</Reference>
3738
<Reference Include="System" />
39+
<Reference Include="System.Configuration" />
3840
<Reference Include="System.Core" />
3941
<Reference Include="System.Xml.Linq" />
4042
<Reference Include="System.Data.DataSetExtensions" />
@@ -48,21 +50,15 @@
4850
</Reference>
4951
</ItemGroup>
5052
<ItemGroup>
51-
<Compile Include="Configuration.Designer.cs">
52-
<DependentUpon>Configuration.settings</DependentUpon>
53-
<AutoGen>True</AutoGen>
54-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
55-
</Compile>
5653
<Compile Include="Properties\AssemblyInfo.cs" />
5754
<Compile Include="PrtgXmlOutput.cs" />
5855
<Compile Include="Tools.cs" />
5956
<Compile Include="ZenDeskApiManager.cs" />
6057
</ItemGroup>
6158
<ItemGroup>
62-
<None Include="app.config" />
63-
<None Include="Configuration.settings">
64-
<Generator>SettingsSingleFileGenerator</Generator>
65-
<LastGenOutput>Configuration.Designer.cs</LastGenOutput>
59+
<None Include="Common.dll.config">
60+
<SubType>Designer</SubType>
61+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6662
</None>
6763
<None Include="packages.config" />
6864
</ItemGroup>

Common/Common.dll.config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
5+
<section name="Common.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
6+
</sectionGroup>
7+
</configSections>
8+
<appSettings>
9+
<add key="Zendesk_subdomain" value="test"/>
10+
<add key="Username" value="testu"/>
11+
<add key="Password" value="testp"/>
12+
</appSettings>
13+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>

Common/Configuration.Designer.cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

Common/ZenDeskApiManager.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using ZendeskApi_v2;
2+
using System.Configuration;
23

34
namespace Common
45
{
@@ -34,8 +35,13 @@ public static ZendeskApi ZendeskApi
3435

3536
private static void initialize()
3637
{
37-
apiUrl = "https://" + Configuration.Default.Zendesk_subdomain + ".zendesk.com/api/v2";
38-
api = new ZendeskApi(apiUrl, Configuration.Default.Username, Configuration.Default.Password);
38+
var subdomain = ConfigurationManager.AppSettings["Zendesk_subdomain"];
39+
var username = ConfigurationManager.AppSettings["Username"];
40+
var password = ConfigurationManager.AppSettings["Password"];
41+
42+
43+
apiUrl = "https://" + subdomain + ".zendesk.com/api/v2";
44+
api = new ZendeskApi(apiUrl, username, password);
3945
}
4046
}
4147
}

Common/app.config

Lines changed: 0 additions & 16 deletions
This file was deleted.

GetZendesAgentStatsInGroup/App.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
<startup>
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
55
</startup>
6+
<appSettings>
7+
<add key="Zendesk_subdomain" value="domain"/>
8+
<add key="Username" value="user"/>
9+
<add key="Password" value="pass"/>
10+
</appSettings>
611
</configuration>

GetZendesAgentStatsInGroup/GetZendesAgentStatsInGroup.csproj

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
<PublishUrl>publish\</PublishUrl>
16+
<Install>true</Install>
17+
<InstallFrom>Disk</InstallFrom>
18+
<UpdateEnabled>false</UpdateEnabled>
19+
<UpdateMode>Foreground</UpdateMode>
20+
<UpdateInterval>7</UpdateInterval>
21+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
22+
<UpdatePeriodically>false</UpdatePeriodically>
23+
<UpdateRequired>false</UpdateRequired>
24+
<MapFileExtensions>true</MapFileExtensions>
25+
<ApplicationRevision>0</ApplicationRevision>
26+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
27+
<IsWebBootstrapper>false</IsWebBootstrapper>
28+
<UseApplicationTrust>false</UseApplicationTrust>
29+
<BootstrapperEnabled>true</BootstrapperEnabled>
1530
</PropertyGroup>
1631
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1732
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -55,7 +70,6 @@
5570
<Compile Include="Properties\AssemblyInfo.cs" />
5671
</ItemGroup>
5772
<ItemGroup>
58-
<None Include="App.config" />
5973
<None Include="packages.config" />
6074
</ItemGroup>
6175
<ItemGroup>
@@ -67,6 +81,18 @@
6781
<Name>Common</Name>
6882
</ProjectReference>
6983
</ItemGroup>
84+
<ItemGroup>
85+
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
86+
<Visible>False</Visible>
87+
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
88+
<Install>true</Install>
89+
</BootstrapperPackage>
90+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
91+
<Visible>False</Visible>
92+
<ProductName>.NET Framework 3.5 SP1</ProductName>
93+
<Install>false</Install>
94+
</BootstrapperPackage>
95+
</ItemGroup>
7096
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7197
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7298
Other similar extension points exist, see Microsoft.Common.targets.

GetZendeskGroupStats/App.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@
33
<startup>
44
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
55
</startup>
6+
<appSettings>
7+
<add key="Zendesk_subdomain" value="domain"/>
8+
<add key="Username" value="user"/>
9+
<add key="Password" value="pass"/>
10+
</appSettings>
611
</configuration>

0 commit comments

Comments
 (0)