Skip to content

Commit

Permalink
revamp namespace based on folder structure for the entire solution (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
lzc850612 authored and darrenj committed Jan 1, 2019
1 parent bf3a91f commit ec4a805
Show file tree
Hide file tree
Showing 204 changed files with 558 additions and 492 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Microsoft.Bot.Builder.AI.QnA;
using Microsoft.Bot.Builder.Azure;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Solutions;
using Microsoft.Bot.Solutions.Middleware.Telemetry;
using Microsoft.Bot.Solutions.Skills;

namespace VirtualAssistant
Expand Down Expand Up @@ -276,4 +276,4 @@ public BotServices(BotConfiguration botConfiguration, Dictionary<string, Diction
/// </value>
public Dictionary<string, ISkillConfiguration> SkillConfigurations { get; set; } = new Dictionary<string, ISkillConfiguration>();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
using System.Threading.Tasks;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using VirtualAssistant.Dialogs.Shared;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Escalate
{
public class EscalateDialog : EnterpriseDialog
{
Expand All @@ -32,4 +33,4 @@ private async Task<DialogTurnResult> SendEscalationMessage(WaterfallStepContext
return await sc.EndDialogAsync();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Bot.Schema;
using VirtualAssistant.Dialogs.Escalate.Resources;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Escalate
{
public class EscalateResponses : TemplateManager
{
Expand Down Expand Up @@ -35,4 +35,4 @@ public class ResponseIds
public const string SendEscalationMessage = "sendPhone";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Schema;
using Microsoft.Bot.Solutions;
using Microsoft.Bot.Solutions.Dialogs;
using Microsoft.Bot.Solutions.Skills;
using VirtualAssistant.Dialogs.Escalate;
using VirtualAssistant.Dialogs.Main.Resources;
using VirtualAssistant.Dialogs.Onboarding;
using VirtualAssistant.Dialogs.Shared;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Main
{
public class MainDialog : RouterDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
using Microsoft.Bot.Builder.TemplateManager;
using Microsoft.Bot.Schema;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using VirtualAssistant.Dialogs.Main.Resources;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Main
{
public class MainResponses : TemplateManager
{
Expand Down Expand Up @@ -136,4 +134,4 @@ public class ResponseIds
public const string Qna = "qna";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

using System.Threading;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using VirtualAssistant.Dialogs.Shared;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Onboarding
{
public class OnboardingDialog : EnterpriseDialog
{
Expand Down Expand Up @@ -71,4 +71,4 @@ public async Task<DialogTurnResult> FinishOnboardingDialog(WaterfallStepContext
return await sc.EndDialogAsync();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.Bot.Schema;
using VirtualAssistant.Dialogs.Onboarding.Resources;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Onboarding
{
public class OnboardingResponses : TemplateManager
{
Expand Down Expand Up @@ -78,4 +78,4 @@ public class ResponseIds
public const string AddLinkedAccountsMessage = "linkedAccountsInfo";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

using Microsoft.Bot.Builder.Dialogs;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Onboarding
{
public class OnboardingState : DialogState
{
public string Name { get; set; }

public string Location { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Solutions.Skills;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Shared
{
public class CustomSkillDialog : ComponentDialog
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Solutions.Dialogs;
using VirtualAssistant.Dialogs.Main;

namespace VirtualAssistant
namespace VirtualAssistant.Dialogs.Shared
{
public class EnterpriseDialog : InterruptableDialog
{
Expand Down Expand Up @@ -80,4 +81,4 @@ protected virtual async Task<InterruptionAction> OnHelp(DialogContext dc)
return InterruptionAction.MessageSentToUser;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using Microsoft.Graph;

namespace VirtualAssistant
namespace VirtualAssistant.ServiceClients
{
public class GraphClient
{
Expand Down Expand Up @@ -45,4 +45,4 @@ await Task.Run(() =>
return graphClient;
}
}
}
}
3 changes: 2 additions & 1 deletion solutions/Virtual-Assistant/src/csharp/assistant/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Bot.Schema;
using Microsoft.Bot.Solutions;
using Microsoft.Bot.Solutions.Middleware;
using Microsoft.Bot.Solutions.Middleware.Telemetry;
using Microsoft.Bot.Solutions.Models.Proactive;
using Microsoft.Bot.Solutions.Skills;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using VirtualAssistant.Dialogs.Main;

namespace VirtualAssistant
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Schema;
using VirtualAssistant.Dialogs.Main;

namespace VirtualAssistant
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Schema;
using Microsoft.Bot.Solutions.Dialogs;
using Microsoft.Bot.Solutions.Extensions;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Dialogs
{
public abstract class RouterDialog : InterruptableDialog
{
Expand Down Expand Up @@ -143,4 +142,4 @@ public RouterDialog(string dialogId, IBotTelemetryClient telemetryClient)
return Task.FromResult(InterruptionAction.NoAction);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Microsoft.Bot.Schema;
using Microsoft.CognitiveServices.ContentModerator;

namespace VirtualAssistant
namespace Microsoft.Bot.Solutions.Middleware
{
/// <summary>
/// Middleware component to run Content Moderator Service on all incoming activities.
Expand Down Expand Up @@ -82,4 +82,4 @@ public ContentModeratorMiddleware(string subscriptionKey, string region)
await next(cancellationToken);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.Dialogs;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
public interface ITelemetryLuisRecognizer : IRecognizer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.QnA;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
public interface ITelemetryQnAMaker
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
/// <summary>
/// The Application Insights property names that we're logging.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
/// <summary>
/// The Application Insights property names that we're logging.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
public static class TelemetryConstants
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Schema;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
/// <summary>
/// Middleware for logging incoming, outgoing, updated or deleted Activity messages into Application Insights.
Expand Down Expand Up @@ -251,4 +250,4 @@ private Dictionary<string, string> FillDeleteEventProperties(IMessageDeleteActiv
return properties;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Microsoft.Bot.Builder.Dialogs;
using Newtonsoft.Json.Linq;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
/// <summary>
/// TelemetryLuisRecognizer invokes the Luis Recognizer and logs some results into Application Insights.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.QnA;
using Newtonsoft.Json;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Middleware.Telemetry
{
/// <summary>
/// TelemetryQnaRecognizer invokes the Qna Maker and logs some results into Application Insights.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Schema;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Prompts
{
public class EventPrompt : ActivityPrompt
{
Expand Down Expand Up @@ -36,4 +36,4 @@ protected override Task<PromptRecognizerResult<Activity>> OnRecognizeAsync(ITurn
return Task.FromResult(result);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.QnA;
using Microsoft.Bot.Solutions.Middleware.Telemetry;

namespace Microsoft.Bot.Solutions.Skills
{
Expand Down Expand Up @@ -44,4 +43,4 @@ public class LocaleConfiguration
/// </value>
public Dictionary<string, ITelemetryQnAMaker> QnAServices { get; set; } = new Dictionary<string, ITelemetryQnAMaker>();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using System.Linq;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Bot.Builder;
using Microsoft.Bot.Builder.AI.Luis;
using Microsoft.Bot.Builder.AI.QnA;
using Microsoft.Bot.Builder.Azure;
using Microsoft.Bot.Configuration;
using Microsoft.Bot.Solutions.Middleware.Telemetry;

namespace Microsoft.Bot.Solutions.Skills
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Translation
{
public enum PluralType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Resources;

namespace Microsoft.Bot.Solutions
namespace Microsoft.Bot.Solutions.Translation
{
public static class ResourceLoaderExtension
{
Expand Down
Loading

0 comments on commit ec4a805

Please sign in to comment.