Skip to content

Commit

Permalink
Fixup namespace for publics. (#361)
Browse files Browse the repository at this point in the history
Massive rename of public surface area to cleanup and move to "Microsoft.PowerFx" namespace.
  • Loading branch information
MikeStall authored Apr 29, 2022
1 parent c21a4fe commit 749ba83
Show file tree
Hide file tree
Showing 390 changed files with 852 additions and 1,059 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.PowerFx.Core.Entities.QueryOptions;
using Microsoft.PowerFx.Core.Functions;
using Microsoft.PowerFx.Core.Logging.Trackers;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.App.Controls
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using System.Collections.Generic;
using Microsoft.PowerFx.Core.Errors;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.App.ErrorContainers
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Collections.Generic;
using Microsoft.PowerFx.Core.Errors;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.App.ErrorContainers
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Collections.Generic;
using Microsoft.PowerFx.Core.Errors;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.App.ErrorContainers
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand All @@ -20,4 +20,4 @@ public AsInfo(AsNode node, DName identifier)
Node = node;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

using System;
using Microsoft.PowerFx.Core.Functions;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand Down Expand Up @@ -72,4 +72,4 @@ public CallInfo(TexlFunction function, CallNode node, DType cursorType, DName sc
RequiresScopeIdentifier = requiresScopeIdentifier;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT license.

using Microsoft.PowerFx.Core.App.Controls;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand All @@ -25,4 +25,4 @@ public ControlKeywordInfo(NameNode node, DPath path, IExternalControl data)
Data = data;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand All @@ -22,4 +22,4 @@ public DottedNameInfo(DottedNameNode node, object data = null)
Data = data;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
using System.Collections.Generic;
using Microsoft.PowerFx.Core.App.Controls;
using Microsoft.PowerFx.Core.Entities.QueryOptions;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand Down Expand Up @@ -126,4 +126,4 @@ public static FirstNameInfo Create(BindKind kind, FirstNameNode node, int nestDs
return new FirstNameInfo(kind, node, nestDst, nestSrc, DPath.Root, data, default, false);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Licensed under the MIT license.

using Microsoft.PowerFx.Core.App.Controls;
using Microsoft.PowerFx.Core.Lexer;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand All @@ -20,4 +19,4 @@ public ParentInfo(ParentNode node, DPath path, IExternalControl data)
{
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Licensed under the MIT license.

using Microsoft.PowerFx.Core.App.Controls;
using Microsoft.PowerFx.Core.Lexer;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding.BindInfo
{
Expand All @@ -20,4 +19,4 @@ public SelfInfo(SelfNode node, DPath path, IExternalControl data)
{
}
}
}
}
9 changes: 3 additions & 6 deletions src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@
using Microsoft.PowerFx.Core.Functions;
using Microsoft.PowerFx.Core.Functions.Delegation;
using Microsoft.PowerFx.Core.Glue;
using Microsoft.PowerFx.Core.Lexer;
using Microsoft.PowerFx.Core.Lexer.Tokens;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Syntax.Visitors;
using Microsoft.PowerFx.Core.Texl;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;
using Microsoft.PowerFx.Types;
using Conditional = System.Diagnostics.ConditionalAttribute;

namespace Microsoft.PowerFx.Core.Binding
Expand Down Expand Up @@ -5790,7 +5787,7 @@ public override void PostVisit(TableNode node)

_txb.SetType(
node,
exprType.IsValid ? DType.CreateTable(new TypedName(exprType, Public.Values.TableValue.ValueDName)) : DType.EmptyTable);
exprType.IsValid ? DType.CreateTable(new TypedName(exprType, TableValue.ValueDName)) : DType.EmptyTable);
SetVariadicNodePurity(node);
_txb.SetScopeUseSet(node, JoinScopeUseSets(node.Children));
_txb.SetSelfContainedConstant(node, isSelfContainedConstant);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
using Microsoft.PowerFx.Core.Binding.BindInfo;
using Microsoft.PowerFx.Core.Entities;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
// Licensed under the MIT license.

using System.Collections.Generic;
using Microsoft.PowerFx.Core.Lexer;
using Microsoft.PowerFx.Core.Syntax;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Syntax.Visitors;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

using Microsoft.PowerFx.Core.Functions;
using Microsoft.PowerFx.Core.Logging.Trackers;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Binding
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Licensed under the MIT license.

using System.Collections.Generic;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Entities
{
Expand Down Expand Up @@ -38,4 +38,4 @@ public static bool TryGetDataSource(this IExternalEntityScope entityScope, TexlN
return entityScope.TryGetEntity<IExternalDataSource>(firstNameNode.Ident.Name, out dataSourceInfo);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// Licensed under the MIT license.

using System.Collections.Generic;
using Microsoft.PowerFx.Core.Public.Values;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Types;

namespace Microsoft.PowerFx.Core.Entities
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
namespace Microsoft.PowerFx.Core.Errors
{
/// <summary>
/// Internal error code - part of Transport Layer and used by Canvas Apps.
/// See <see cref="ErrorSeverity"/> for public facing type.
/// Severity of errors provided.
/// </summary>
[TransportType(TransportKind.Enum)]
public enum DocumentErrorSeverity
internal enum DocumentErrorSeverity
{
#pragma warning disable SA1300 // Element should begin with upper-case letter
_Min = Verbose,
Expand Down
62 changes: 62 additions & 0 deletions src/libraries/Microsoft.PowerFx.Core/Errors/ErrorSeverity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

namespace Microsoft.PowerFx
{
/// <summary>
/// Severity of errors provided.
/// </summary>
public enum ErrorSeverity
{
// These values are a mirror of Microsoft.PowerFx.Core.Errors.DocumentErrorSeverity,
// which is an internal type with [TransportType] attribute.

#pragma warning disable SA1300 // Element should begin with upper-case letter
_Min = Verbose,
#pragma warning restore SA1300 // Element should begin with upper-case letter

/// <summary>
/// A suggestion about possible high-level improvements or refactoring that may help the user
/// get a better app experience.
/// Examples: performance changes
/// </summary>
Verbose = 0,

/// <summary>
/// A suggestion about possible improvements or refactoring that may help the user
/// get a better app experience.
/// Examples: refactoring suggestions.
/// </summary>
Suggestion,

/// <summary>
/// A warning about a potential problem. These will typically not prevent normal rule execution.
/// Examples: certain type errors/warnings.
/// </summary>
Warning,

/// <summary>
/// A moderate error that may prevent rules from executing properly.
/// Examples: Service unavailable, service schema changed.
/// </summary>
Moderate,

/// <summary>
/// A severe error that will likely prevent rules from executing properly.
/// This type of errors prevents generation of code and publishing.
/// Examples: invocation of unknown functions, invalid names, certain type errors.
/// </summary>
Severe,

/// <summary>
/// A critical error, e.g. an error that prevents rules from executing properly.
/// This type of errors prevent generation of code and publishing.
/// Example: syntax errors.
/// </summary>
Critical,

#pragma warning disable SA1300 // Element should begin with upper-case letter
_Lim = Critical,
#pragma warning restore SA1300 // Element should begin with upper-case letter
}
}
3 changes: 1 addition & 2 deletions src/libraries/Microsoft.PowerFx.Core/Errors/TexlError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.PowerFx.Core.Lexer.Tokens;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Errors
{
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Microsoft.PowerFx.Core/FeatureFlags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

namespace Microsoft.PowerFx
namespace Microsoft.PowerFx.Preview
{
/// <summary>
/// Hosts can enable these flags to try out early features.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
using Microsoft.PowerFx.Core.App.ErrorContainers;
using Microsoft.PowerFx.Core.Errors;
using Microsoft.PowerFx.Core.Localization;
using Microsoft.PowerFx.Core.Syntax.Nodes;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Functions
{
Expand Down Expand Up @@ -41,4 +41,4 @@ public void Errors(TexlNode node, DType nodeType, KeyValuePair<string, DType> sc
// Do nothing.
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using Microsoft.PowerFx.Core.Lexer;
using Microsoft.PowerFx.Core.Utils;
using Microsoft.PowerFx.Syntax;

namespace Microsoft.PowerFx.Core.Functions.Delegation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT license.

using System.Collections.Generic;
using Microsoft.PowerFx.Core.Lexer;
using Microsoft.PowerFx.Core.Types;
using Microsoft.PowerFx.Core.Utils;

Expand Down
Loading

0 comments on commit 749ba83

Please sign in to comment.