Skip to content

Commit 3d48fc4

Browse files
committed
refine codes
1 parent a03fea2 commit 3d48fc4

15 files changed

+102
-64
lines changed

src/Authentication.Abstractions/Authentication.Abstractions.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454

5555
<ItemGroup>
5656
<None Include="..\..\LICENSE.txt" Link="LICENSE.txt" Pack="true" PackagePath="" />
57+
<Folder Include="Models\" />
5758
</ItemGroup>
5859

5960
</Project>

src/Authentication.Abstractions/Interfaces/IConfigManagerWithEvents.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
using Microsoft.Azure.Commands.Common.Authentication.Abstractions.Models;
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// -------------------------------------
14+
15+
using Microsoft.Azure.Commands.Common.Authentication.Abstractions.Models;
216
using Microsoft.Azure.PowerShell.Common.Config;
317

418
using System;
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// -------------------------------------
14+
15+
using System;
16+
using System.Collections.Generic;
17+
18+
namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions.Models
19+
{
20+
public class ConfigEventArgs : EventArgs, IExtensibleModel
21+
{
22+
public string ConfigKey { get; }
23+
24+
public string ConfigValue { get; }
25+
26+
public IDictionary<string, string> ExtendedProperties { get; } = new Dictionary<string, string>();
27+
28+
public ConfigEventArgs(string configKey, string configValue)
29+
{
30+
ConfigKey = configKey;
31+
ConfigValue = configValue;
32+
}
33+
}
34+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// -------------------------------------
14+
15+
namespace Microsoft.Azure.Commands.Common.Authentication.Abstractions.Models
16+
{
17+
public class ConfigReadEventArgs : ConfigEventArgs
18+
{
19+
public string ConfigTelemetryKey { get; }
20+
21+
public ConfigReadEventArgs(string configKey, string configValue) : this(configKey, configKey, configValue)
22+
{
23+
}
24+
25+
public ConfigReadEventArgs(string configKey, string configTelemetryKey, string configValue) : base(configKey, configValue)
26+
{
27+
ConfigTelemetryKey = configTelemetryKey;
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)