diff --git a/src/Microsoft.OData.Client/ALinq/ALinqExpressionVisitor.cs b/src/Microsoft.OData.Client/ALinq/ALinqExpressionVisitor.cs
index 4d0e2ac157..f956205018 100644
--- a/src/Microsoft.OData.Client/ALinq/ALinqExpressionVisitor.cs
+++ b/src/Microsoft.OData.Client/ALinq/ALinqExpressionVisitor.cs
@@ -97,7 +97,7 @@ internal virtual Expression Visit(Expression exp)
case ExpressionType.ListInit:
return this.VisitListInit((ListInitExpression)exp);
default:
- throw new NotSupportedException(Strings.ALinq_UnsupportedExpression(exp.NodeType.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_UnsupportedExpression, exp.NodeType.ToString()));
}
}
@@ -117,7 +117,7 @@ internal virtual MemberBinding VisitBinding(MemberBinding binding)
case MemberBindingType.ListBinding:
return this.VisitMemberListBinding((MemberListBinding)binding);
default:
- throw new NotSupportedException(Strings.ALinq_UnsupportedExpression(binding.BindingType.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_UnsupportedExpression, binding.BindingType.ToString()));
}
}
diff --git a/src/Microsoft.OData.Client/ALinq/AddNewEndingTokenVisitor.cs b/src/Microsoft.OData.Client/ALinq/AddNewEndingTokenVisitor.cs
index 7ec7d1ae99..971add668a 100644
--- a/src/Microsoft.OData.Client/ALinq/AddNewEndingTokenVisitor.cs
+++ b/src/Microsoft.OData.Client/ALinq/AddNewEndingTokenVisitor.cs
@@ -34,7 +34,7 @@ public AddNewEndingTokenVisitor(PathSegmentToken newTokenToAdd)
/// The system token to traverse
public void Visit(SystemToken tokenIn)
{
- throw new NotSupportedException(Strings.ALinq_IllegalSystemQueryOption(tokenIn.Identifier));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_IllegalSystemQueryOption, tokenIn.Identifier));
}
///
diff --git a/src/Microsoft.OData.Client/ALinq/DataServiceQueryProvider.cs b/src/Microsoft.OData.Client/ALinq/DataServiceQueryProvider.cs
index 014d58b274..dfa0a3934d 100644
--- a/src/Microsoft.OData.Client/ALinq/DataServiceQueryProvider.cs
+++ b/src/Microsoft.OData.Client/ALinq/DataServiceQueryProvider.cs
@@ -343,7 +343,7 @@ private TElement ParseAggregateSingletonResult(QueryResult queryResult
}
// Failed to retrieve the aggregate result for whatever reason
- throw new DataServiceQueryException(Strings.DataServiceRequest_FailGetValue);
+ throw new DataServiceQueryException(SRResources.DataServiceRequest_FailGetValue);
}
}
}
diff --git a/src/Microsoft.OData.Client/ALinq/ExpandOnlyPathToStringVisitor.cs b/src/Microsoft.OData.Client/ALinq/ExpandOnlyPathToStringVisitor.cs
index 7c48d2395b..fd94f579c5 100644
--- a/src/Microsoft.OData.Client/ALinq/ExpandOnlyPathToStringVisitor.cs
+++ b/src/Microsoft.OData.Client/ALinq/ExpandOnlyPathToStringVisitor.cs
@@ -33,7 +33,7 @@ internal class ExpandOnlyPathToStringVisitor : IPathSegmentTokenVisitor
/// Always throws, since a system token is invalid in an expand path.
public string Visit(SystemToken tokenIn)
{
- throw new NotSupportedException(Strings.ALinq_IllegalSystemQueryOption(tokenIn.Identifier));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_IllegalSystemQueryOption, tokenIn.Identifier));
}
///
@@ -51,7 +51,7 @@ public string Visit(NonSystemToken tokenIn)
}
else
{
- throw new NotSupportedException(Strings.ALinq_TypeTokenWithNoTrailingNavProp(tokenIn.Identifier));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_TypeTokenWithNoTrailingNavProp, tokenIn.Identifier));
}
}
else
diff --git a/src/Microsoft.OData.Client/ALinq/ExpressionWriter.cs b/src/Microsoft.OData.Client/ALinq/ExpressionWriter.cs
index 9a96d58fa7..5e32868e79 100644
--- a/src/Microsoft.OData.Client/ALinq/ExpressionWriter.cs
+++ b/src/Microsoft.OData.Client/ALinq/ExpressionWriter.cs
@@ -116,7 +116,7 @@ internal static string ExpressionToString(DataServiceContext context, Expression
WebUtil.RaiseVersion(ref uriVersion, ew.uriVersion);
if (ew.cantTranslateExpression)
{
- throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(e.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantTranslateExpression, e.ToString()));
}
return serialized;
@@ -229,7 +229,7 @@ internal override Expression VisitInputReferenceExpression(InputReferenceExpress
// because we cannot reference 'this' as a standalone expression; however
// if the parent is null for any reason, we fall back to the expression itself.
string expressionText = (this.parent != null) ? this.parent.ToString() : ire.ToString();
- throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(expressionText));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantTranslateExpression, expressionText));
}
// Write "$it" for input parameter reference inside any/all methods
@@ -426,7 +426,7 @@ internal override Expression VisitMethodCall(MethodCallExpression m)
string declaringType = this.context.ResolveNameFromTypeInternal(m.Method.DeclaringType);
if (string.IsNullOrEmpty(declaringType))
{
- throw new NotSupportedException(Strings.ALinq_CantTranslateExpression(m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantTranslateExpression, m.ToString()));
}
int index = declaringType.LastIndexOf('.');
@@ -472,7 +472,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
{
if (m.Member is FieldInfo)
{
- throw new NotSupportedException(Strings.ALinq_CantReferToPublicField(m.Member.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantReferToPublicField, m.Member.Name));
}
Expression e = this.Visit(m.Expression);
@@ -572,7 +572,7 @@ internal override Expression VisitConstant(ConstantExpression c)
return c;
}
- throw new NotSupportedException(Strings.ALinq_CouldNotConvert(item));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CouldNotConvert, item));
}
listExpr.Append(uriLiteral);
@@ -581,7 +581,7 @@ internal override Expression VisitConstant(ConstantExpression c)
// Contains cannot be used with an empty static collection
if (listExpr.Length == 0)
{
- throw new InvalidOperationException(Strings.ALinq_ContainsNotValidOnEmptyCollection);
+ throw new InvalidOperationException(SRResources.ALinq_ContainsNotValidOnEmptyCollection);
}
listExpr.Insert(0, UriHelper.LEFTPAREN);
@@ -604,7 +604,7 @@ internal override Expression VisitConstant(ConstantExpression c)
return c;
}
- throw new NotSupportedException(Strings.ALinq_CouldNotConvert(c.Value));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CouldNotConvert, c.Value));
}
}
@@ -666,7 +666,7 @@ internal override Expression VisitUnary(UnaryExpression u)
case ExpressionType.TypeAs:
if (u.Operand.NodeType == ExpressionType.TypeAs)
{
- throw new NotSupportedException(Strings.ALinq_CannotUseTypeFiltersMultipleTimes);
+ throw new NotSupportedException(SRResources.ALinq_CannotUseTypeFiltersMultipleTimes);
}
this.Visit(u.Operand);
diff --git a/src/Microsoft.OData.Client/ALinq/GroupByAnalyzer.cs b/src/Microsoft.OData.Client/ALinq/GroupByAnalyzer.cs
index efbe1d6b50..e57b6a9173 100644
--- a/src/Microsoft.OData.Client/ALinq/GroupByAnalyzer.cs
+++ b/src/Microsoft.OData.Client/ALinq/GroupByAnalyzer.cs
@@ -218,7 +218,7 @@ internal override NewExpression VisitNew(NewExpression nex)
else if (nex.Arguments.Count > 0 && nex.Constructor.GetParameters().Length > 0)
{
// Constructor initialization in key selector not supported
- throw new NotSupportedException(Strings.ALinq_InvalidGroupByKeySelector(nex));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidGroupByKeySelector, nex));
}
return base.VisitNew(nex);
diff --git a/src/Microsoft.OData.Client/ALinq/NewTreeBuilder.cs b/src/Microsoft.OData.Client/ALinq/NewTreeBuilder.cs
index bd10daf172..90084e44d5 100644
--- a/src/Microsoft.OData.Client/ALinq/NewTreeBuilder.cs
+++ b/src/Microsoft.OData.Client/ALinq/NewTreeBuilder.cs
@@ -21,7 +21,7 @@ internal class NewTreeBuilder : IPathSegmentTokenVisitor
/// Always throws, since a SystemToken is illegal in a select or expand path.
public PathSegmentToken Visit(SystemToken tokenIn)
{
- throw new NotSupportedException(Strings.ALinq_IllegalSystemQueryOption(tokenIn.Identifier));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_IllegalSystemQueryOption, tokenIn.Identifier));
}
///
diff --git a/src/Microsoft.OData.Client/ALinq/ProjectionAnalyzer.cs b/src/Microsoft.OData.Client/ALinq/ProjectionAnalyzer.cs
index 35d221a9cf..5f46ac90f8 100644
--- a/src/Microsoft.OData.Client/ALinq/ProjectionAnalyzer.cs
+++ b/src/Microsoft.OData.Client/ALinq/ProjectionAnalyzer.cs
@@ -49,7 +49,7 @@ internal static bool Analyze(LambdaExpression le, ResourceExpression re, bool ma
{
if (ClientTypeUtil.TypeOrElementTypeIsEntity(le.Body.Type))
{
- throw new NotSupportedException(Strings.ALinq_CannotCreateConstantEntity);
+ throw new NotSupportedException(SRResources.ALinq_CannotCreateConstantEntity);
}
re.Projection = new ProjectionQueryOptionExpression(le.Body.Type, le, new List());
@@ -98,9 +98,9 @@ private static void Analyze(LambdaExpression e, SelectExpandPathBuilder pb, Data
EntityProjectionAnalyzer.Analyze((MemberInitExpression)e.Body, pb, context);
break;
case ExpressionType.New:
- throw new NotSupportedException(Strings.ALinq_CannotConstructKnownEntityTypes);
+ throw new NotSupportedException(SRResources.ALinq_CannotConstructKnownEntityTypes);
case ExpressionType.Constant:
- throw new NotSupportedException(Strings.ALinq_CannotCreateConstantEntity);
+ throw new NotSupportedException(SRResources.ALinq_CannotCreateConstantEntity);
default:
// ExpressionType.MemberAccess as a top-level expression is correctly
// processed here, as the lambda isn't being member-initialized.
@@ -145,7 +145,7 @@ internal static void CheckChainedSequence(MethodCallExpression call, Type type)
MethodCallExpression insideCall = ResourceBinder.StripTo(call.Arguments[0]);
if (insideCall != null && (ReflectionUtil.IsSequenceSelectMethod(insideCall.Method)))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(type, call.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, type, call.ToString()));
}
}
}
@@ -342,7 +342,7 @@ internal static void Analyze(MemberInitExpression mie, SelectExpandPathBuilder p
Expression[] lastExpressions = analysis.GetExpressionsBeyondTargetEntity();
if (lastExpressions.Length == 0)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(targetType, ma.Expression));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, targetType, ma.Expression));
}
MemberExpression lastExpression = lastExpressions[lastExpressions.Length - 1] as MemberExpression;
@@ -362,7 +362,7 @@ internal static void Analyze(MemberInitExpression mie, SelectExpandPathBuilder p
{
if (lastExpression.Member.Name != ma.Member.Name)
{
- throw new NotSupportedException(Strings.ALinq_PropertyNamesMustMatchInProjections(lastExpression.Member.Name, ma.Member.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_PropertyNamesMustMatchInProjections, lastExpression.Member.Name, ma.Member.Name));
}
// Unless we're initializing an entity, we should not traverse into the parameter in scope.
@@ -370,7 +370,7 @@ internal static void Analyze(MemberInitExpression mie, SelectExpandPathBuilder p
bool sourceIsEntity = ClientTypeUtil.TypeOrElementTypeIsEntity(lastExpression.Type);
if (sourceIsEntity && !targetIsEntity)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(targetType, ma.Expression));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, targetType, ma.Expression));
}
}
}
@@ -403,17 +403,17 @@ internal override Expression VisitUnary(UnaryExpression u)
// In V3 while we support TypeAs conversions, we only support TypeAs before a MemberAccess and not TypeAs as the last operation
// i.e. we support "Manager = (p as Employee).Manager" (see VisitMemberAccess for detail), but we don't support "Manager = (p as Manager)"
// Note that the server also doesn't support a property path which ends with a type identifier.
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, u.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, u.ToString()));
}
internal override Expression VisitBinary(BinaryExpression b)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, b.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, b.ToString()));
}
internal override Expression VisitTypeIs(TypeBinaryExpression b)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, b.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, b.ToString()));
}
internal override Expression VisitConditional(ConditionalExpression c)
@@ -425,12 +425,12 @@ internal override Expression VisitConditional(ConditionalExpression c)
return c;
}
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, c.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, c.ToString()));
}
internal override Expression VisitConstant(ConstantExpression c)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, c.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, c.ToString()));
}
internal override Expression VisitMemberAccess(MemberExpression m)
@@ -443,7 +443,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
if (!ClientTypeUtil.TypeOrElementTypeIsEntity(m.Expression.Type) ||
IsCollectionProducingExpression(m.Expression))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, m.ToString()));
}
PropertyInfo pi;
@@ -459,7 +459,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
return e;
}
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, m.ToString()));
}
internal override Expression VisitMethodCall(MethodCallExpression m)
@@ -470,7 +470,7 @@ internal override Expression VisitMethodCall(MethodCallExpression m)
|| m.Arguments.Any(a => IsDisallowedExpressionForMethodCall(a, this.context.Model))
|| (m.Object == null && !ClientTypeUtil.TypeOrElementTypeIsEntity(m.Arguments[0].Type)))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, m.ToString()));
}
if (ProjectionAnalyzer.IsMethodCallAllowedEntitySequence(m))
@@ -482,12 +482,12 @@ internal override Expression VisitMethodCall(MethodCallExpression m)
return base.VisitMethodCall(m);
}
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, m.ToString()));
}
internal override Expression VisitInvocation(InvocationExpression iv)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, iv.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, iv.ToString()));
}
internal override Expression VisitLambda(LambdaExpression lambda)
@@ -498,12 +498,12 @@ internal override Expression VisitLambda(LambdaExpression lambda)
internal override Expression VisitListInit(ListInitExpression init)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, init.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, init.ToString()));
}
internal override Expression VisitNewArray(NewArrayExpression na)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, na.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, na.ToString()));
}
internal override Expression VisitMemberInit(MemberInitExpression init)
@@ -511,7 +511,7 @@ internal override Expression VisitMemberInit(MemberInitExpression init)
if (!ClientTypeUtil.TypeOrElementTypeIsEntity(init.Type))
{
// MemberInit to a complex type is not supported on entity types.
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, init.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, init.ToString()));
}
ProjectionAnalyzer.Analyze(init, this.builder, this.context);
@@ -557,14 +557,14 @@ internal override NewExpression VisitNew(NewExpression nex)
}
}
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, nex.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjectionToEntity, this.type, nex.ToString()));
}
internal override Expression VisitParameter(ParameterExpression p)
{
if (p != this.builder.ParamExpressionInScope)
{
- throw new NotSupportedException(Strings.ALinq_CanOnlyProjectTheLeaf);
+ throw new NotSupportedException(SRResources.ALinq_CanOnlyProjectTheLeaf);
}
this.builder.StartNewPath();
@@ -633,7 +633,7 @@ internal override Expression VisitUnary(UnaryExpression u)
if (ClientTypeUtil.TypeOrElementTypeIsEntity(u.Operand.Type))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, u.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, u.ToString()));
}
}
@@ -646,7 +646,7 @@ internal override Expression VisitBinary(BinaryExpression b)
ClientTypeUtil.TypeOrElementTypeIsEntity(b.Right.Type) ||
IsCollectionProducingExpression(b.Left) || IsCollectionProducingExpression(b.Right))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, b.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, b.ToString()));
}
return base.VisitBinary(b);
@@ -656,7 +656,7 @@ internal override Expression VisitTypeIs(TypeBinaryExpression b)
{
if (ClientTypeUtil.TypeOrElementTypeIsEntity(b.Expression.Type) || IsCollectionProducingExpression(b.Expression))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, b.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, b.ToString()));
}
return base.VisitTypeIs(b);
@@ -676,7 +676,7 @@ internal override Expression VisitConditional(ConditionalExpression c)
ClientTypeUtil.TypeOrElementTypeIsEntity(c.IfFalse.Type)
|| IsCollectionProducingExpression(c.Test) || IsCollectionProducingExpression(c.IfTrue) || IsCollectionProducingExpression(c.IfFalse))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, c.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, c.ToString()));
}
return base.VisitConditional(c);
@@ -718,7 +718,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
// and changing IsCollectionProducingExpression seems risky at this point as it's used in a lot of places.
if (IsCollectionProducingExpression(m.Expression))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, m.ToString()));
}
PropertyInfo pi;
@@ -737,7 +737,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
return e;
}
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, m.ToString()));
}
internal override Expression VisitMethodCall(MethodCallExpression m)
@@ -745,7 +745,7 @@ internal override Expression VisitMethodCall(MethodCallExpression m)
if ((m.Object != null && IsDisallowedExpressionForMethodCall(m.Object, this.context.Model))
|| m.Arguments.Any(a => IsDisallowedExpressionForMethodCall(a, this.context.Model)))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, m.ToString()));
}
CheckChainedSequence(m, this.type);
@@ -758,7 +758,7 @@ internal override Expression VisitMethodCall(MethodCallExpression m)
if ((m.Object != null ? ClientTypeUtil.TypeOrElementTypeIsEntity(m.Object.Type) : false)
|| m.Arguments.Any(a => ClientTypeUtil.TypeOrElementTypeIsEntity(a.Type)))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, m.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, m.ToString()));
}
return base.VisitMethodCall(m);
@@ -770,7 +770,7 @@ internal override Expression VisitInvocation(InvocationExpression iv)
IsCollectionProducingExpression(iv.Expression) ||
iv.Arguments.Any(a => ClientTypeUtil.TypeOrElementTypeIsEntity(a.Type) || IsCollectionProducingExpression(a)))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, iv.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, iv.ToString()));
}
return base.VisitInvocation(iv);
@@ -794,7 +794,7 @@ internal override NewExpression VisitNew(NewExpression nex)
if (ClientTypeUtil.TypeOrElementTypeIsEntity(nex.Type) &&
!ResourceBinder.PatternRules.MatchNewDataServiceCollectionOfT(nex))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, nex.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, nex.ToString()));
}
return base.VisitNew(nex);
@@ -806,7 +806,7 @@ internal override Expression VisitParameter(ParameterExpression p)
{
if (p != this.builder.ParamExpressionInScope)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, p.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, p.ToString()));
}
this.builder.StartNewPath();
@@ -818,7 +818,7 @@ internal override Expression VisitConstant(ConstantExpression c)
{
if (ClientTypeUtil.TypeOrElementTypeIsEntity(c.Type))
{
- throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjection(this.type, c.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionNotSupportedInProjection, this.type, c.ToString()));
}
return base.VisitConstant(c);
diff --git a/src/Microsoft.OData.Client/ALinq/ProjectionRewriter.cs b/src/Microsoft.OData.Client/ALinq/ProjectionRewriter.cs
index 46492afc0d..34f0fe9f7a 100644
--- a/src/Microsoft.OData.Client/ALinq/ProjectionRewriter.cs
+++ b/src/Microsoft.OData.Client/ALinq/ProjectionRewriter.cs
@@ -70,7 +70,7 @@ internal LambdaExpression Rebind(LambdaExpression lambda, ResourceExpression sou
}
else
{
- throw new NotSupportedException(Strings.ALinq_CanOnlyProjectTheLeaf);
+ throw new NotSupportedException(SRResources.ALinq_CanOnlyProjectTheLeaf);
}
}
diff --git a/src/Microsoft.OData.Client/ALinq/QueryableResourceExpression.cs b/src/Microsoft.OData.Client/ALinq/QueryableResourceExpression.cs
index c2333e9d94..57338cf11d 100644
--- a/src/Microsoft.OData.Client/ALinq/QueryableResourceExpression.cs
+++ b/src/Microsoft.OData.Client/ALinq/QueryableResourceExpression.cs
@@ -351,15 +351,15 @@ internal void AddFilter(IEnumerable predicateConjuncts)
{
if (this.Skip != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("filter", "skip"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "filter", "skip"));
}
else if (this.Take != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("filter", "top"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "filter", "top"));
}
else if (this.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("filter", "select"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "filter", "select"));
}
if (this.Filter == null)
@@ -392,7 +392,7 @@ internal void AddAggregation(Expression aggregationExpr, AggregationMethod aggre
if (this.OrderBy != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("apply", "orderby"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "apply", "orderby"));
}
else if (this.Skip != null)
{
@@ -400,11 +400,11 @@ internal void AddAggregation(Expression aggregationExpr, AggregationMethod aggre
// However, support for rollup is currently not implemented in OData WebApi
// If $skip and/or $top appears before $apply, its currently ignored.
// Makes sense to throw an exception to avoid giving a false impression.
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("apply", "skip"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "apply", "skip"));
}
else if (this.Take != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("apply", "top"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "apply", "top"));
}
if (this.Apply == null)
diff --git a/src/Microsoft.OData.Client/ALinq/RemoveWildcardVisitor.cs b/src/Microsoft.OData.Client/ALinq/RemoveWildcardVisitor.cs
index 08526c71f4..efe5aa977e 100644
--- a/src/Microsoft.OData.Client/ALinq/RemoveWildcardVisitor.cs
+++ b/src/Microsoft.OData.Client/ALinq/RemoveWildcardVisitor.cs
@@ -26,7 +26,7 @@ internal class RemoveWildcardVisitor : IPathSegmentTokenVisitor
/// The SystemToken to translate.
public void Visit(SystemToken tokenIn)
{
- throw new NotSupportedException(Strings.ALinq_IllegalSystemQueryOption(tokenIn.Identifier));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_IllegalSystemQueryOption, tokenIn.Identifier));
}
///
diff --git a/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs b/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs
index 2393e989b9..74f16ad0dd 100644
--- a/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs
+++ b/src/Microsoft.OData.Client/ALinq/ResourceBinder.cs
@@ -120,7 +120,7 @@ internal static void VerifyKeyPredicates(Expression e)
{
if (IsMissingKeyPredicates(e))
{
- throw new NotSupportedException(Strings.ALinq_CantNavigateWithoutKeyPredicate);
+ throw new NotSupportedException(SRResources.ALinq_CantNavigateWithoutKeyPredicate);
}
}
@@ -143,12 +143,12 @@ internal static void VerifyNotSelectManyProjection(Expression expression)
MethodCallExpression call = StripTo(projection.Selector.Body);
if (call != null && call.Method.Name == "SelectMany")
{
- throw new NotSupportedException(Strings.ALinq_UnsupportedExpression(call));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_UnsupportedExpression, call));
}
}
else if (resourceExpression.HasTransparentScope)
{
- throw new NotSupportedException(Strings.ALinq_UnsupportedExpression(resourceExpression));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_UnsupportedExpression, resourceExpression));
}
}
}
@@ -353,7 +353,7 @@ private static List ExtractKeyPredicate(
{
// UNSUPPORTED: = AND = are multiple key predicates and
// cannot be represented as a resource path.
- throw Error.NotSupported(Strings.ALinq_CanOnlyApplyOneKeyPredicate);
+ throw Error.NotSupported(SRResources.ALinq_CanOnlyApplyOneKeyPredicate);
}
keyValuesFromPredicates.Add(property, constantValue);
@@ -1021,7 +1021,7 @@ private static Expression AnalyzeOfType(MethodCallExpression mce)
if (filteredType == null)
{
- throw new InvalidOperationException(Strings.ALinq_OfTypeArgumentNotAvailable);
+ throw new InvalidOperationException(SRResources.ALinq_OfTypeArgumentNotAvailable);
}
if (filteredType.IsAssignableFrom(rse.ResourceType))
@@ -1032,7 +1032,7 @@ private static Expression AnalyzeOfType(MethodCallExpression mce)
{
if (rse.ResourceTypeAs != null)
{
- throw new NotSupportedException(Strings.ALinq_CannotUseTypeFiltersMultipleTimes);
+ throw new NotSupportedException(SRResources.ALinq_CannotUseTypeFiltersMultipleTimes);
}
// only apply the OfType filter if it is not redundant
@@ -1396,7 +1396,7 @@ internal static T StripTo(Expression expression, out Type convertedType) wher
// Note 1: this also means that we do not support multiple downcasts as these are redundant,
// e.g., ((p as Employee) as Manager)
// from e in p.OfType() select e as Manager
- throw new NotSupportedException(Strings.ALinq_CannotUseTypeFiltersMultipleTimes);
+ throw new NotSupportedException(SRResources.ALinq_CannotUseTypeFiltersMultipleTimes);
}
else
{
@@ -1503,35 +1503,35 @@ internal static void AddSequenceQueryOption(ResourceExpression target, QueryOpti
case (ExpressionType)ResourceExpressionType.FilterQueryOption:
if (rse.Skip != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("filter", "skip"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "filter", "skip"));
}
else if (rse.Take != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("filter", "top"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "filter", "top"));
}
else if (rse.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("filter", "select"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "filter", "select"));
}
break;
case (ExpressionType)ResourceExpressionType.OrderByQueryOption:
if (rse.Skip != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("orderby", "skip"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "orderby", "skip"));
}
else if (rse.Take != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("orderby", "top"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "orderby", "top"));
}
else if (rse.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("orderby", "select"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "orderby", "select"));
}
break;
case (ExpressionType)ResourceExpressionType.SkipQueryOption:
if (rse.Take != null)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionOutOfOrder("skip", "top"));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionOutOfOrder, "skip", "top"));
}
break;
default:
@@ -2754,13 +2754,13 @@ internal static void RequireCanNavigate(Expression e)
QueryableResourceExpression resourceExpression = e as QueryableResourceExpression;
if (resourceExpression != null && resourceExpression.HasSequenceQueryOptions)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionsOnlyAllowedOnLeafNodes);
+ throw new NotSupportedException(SRResources.ALinq_QueryOptionsOnlyAllowedOnLeafNodes);
}
ResourceExpression resource;
if (PatternRules.MatchResource(e, out resource) && resource.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_ProjectionOnlyAllowedOnLeafNodes);
+ throw new NotSupportedException(SRResources.ALinq_ProjectionOnlyAllowedOnLeafNodes);
}
}
@@ -2769,17 +2769,17 @@ internal static void RequireCanProject(Expression e)
ResourceExpression re = (ResourceExpression)e;
if (!PatternRules.MatchResource(e, out re))
{
- throw new NotSupportedException(Strings.ALinq_CanOnlyProjectTheLeaf);
+ throw new NotSupportedException(SRResources.ALinq_CanOnlyProjectTheLeaf);
}
if (re.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_ProjectionCanOnlyHaveOneProjection);
+ throw new NotSupportedException(SRResources.ALinq_ProjectionCanOnlyHaveOneProjection);
}
if (re.ExpandPaths.Count > 0)
{
- throw new NotSupportedException(Strings.ALinq_CannotProjectWithExplicitExpansion);
+ throw new NotSupportedException(SRResources.ALinq_CannotProjectWithExplicitExpansion);
}
}
@@ -2788,12 +2788,12 @@ internal static void RequireCanExpand(Expression e)
ResourceExpression re = (ResourceExpression)e;
if (!PatternRules.MatchResource(e, out re))
{
- throw new NotSupportedException(Strings.ALinq_CantExpand);
+ throw new NotSupportedException(SRResources.ALinq_CantExpand);
}
if (re.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_CannotProjectWithExplicitExpansion);
+ throw new NotSupportedException(SRResources.ALinq_CannotProjectWithExplicitExpansion);
}
}
@@ -2802,13 +2802,13 @@ internal static void RequireCanAddCount(Expression e)
ResourceExpression re = (ResourceExpression)e;
if (!PatternRules.MatchResource(e, out re))
{
- throw new NotSupportedException(Strings.ALinq_CannotAddCountOption);
+ throw new NotSupportedException(SRResources.ALinq_CannotAddCountOption);
}
// do we already have a count option?
if (re.CountOption != CountOption.None)
{
- throw new NotSupportedException(Strings.ALinq_CannotAddCountOptionConflict);
+ throw new NotSupportedException(SRResources.ALinq_CannotAddCountOptionConflict);
}
}
@@ -2817,7 +2817,7 @@ internal static void RequireCanAddCustomQueryOption(Expression e)
ResourceExpression re = (ResourceExpression)e;
if (!PatternRules.MatchResource(e, out re))
{
- throw new NotSupportedException(Strings.ALinq_CantAddQueryOption);
+ throw new NotSupportedException(SRResources.ALinq_CantAddQueryOption);
}
}
@@ -2826,7 +2826,7 @@ internal static void RequireNonSingleton(Expression e)
ResourceExpression re = e as ResourceExpression;
if (re != null && re.IsSingleton)
{
- throw new NotSupportedException(Strings.ALinq_QueryOptionsOnlyAllowedOnSingletons);
+ throw new NotSupportedException(SRResources.ALinq_QueryOptionsOnlyAllowedOnSingletons);
}
}
@@ -2839,7 +2839,7 @@ internal static void RequireLegalCustomQueryOption(Expression e, ResourceExpress
if (target.CustomQueryOptions.Any(c => (string)c.Key.Value == name))
{
// don't allow dups in Astoria $ namespace.
- throw new NotSupportedException(Strings.ALinq_CantAddDuplicateQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddDuplicateQueryOption, name));
}
QueryableResourceExpression rse = target as QueryableResourceExpression;
@@ -2850,12 +2850,12 @@ internal static void RequireLegalCustomQueryOption(Expression e, ResourceExpress
case UriHelper.OPTIONFILTER:
if (rse.Filter != null)
{
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
}
break;
case UriHelper.OPTIONORDERBY:
if (rse.OrderBy != null)
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
break;
case UriHelper.OPTIONEXPAND:
// how did we get here?
@@ -2863,21 +2863,21 @@ internal static void RequireLegalCustomQueryOption(Expression e, ResourceExpress
break;
case UriHelper.OPTIONSKIP:
if (rse.Skip != null)
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
break;
case UriHelper.OPTIONTOP:
if (rse.Take != null)
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
break;
case UriHelper.OPTIONCOUNT:
// cannot add count if any counting already exists
if (rse.CountOption != CountOption.None)
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
break;
case UriHelper.OPTIONSELECT:
if (rse.Projection != null)
{
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
}
// DEVNOTE(pqian):
// while the normal projection analyzer does not allow expansions, we must allow it here
@@ -2889,10 +2889,10 @@ internal static void RequireLegalCustomQueryOption(Expression e, ResourceExpress
break;
case UriHelper.OPTIONAPPLY:
if (rse.Apply != null)
- throw new NotSupportedException(Strings.ALinq_CantAddAstoriaQueryOption(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantAddAstoriaQueryOption, name));
break;
default:
- throw new NotSupportedException(Strings.ALinq_QueryOptionNotSupported(name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_QueryOptionNotSupported, name));
}
}
}
@@ -2904,7 +2904,7 @@ internal static void RequireLegalCustomQueryOption(Expression e, ResourceExpress
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "DataServiceContext", Justification = "The spelling is correct.")]
private static void ThrowNotSupportedExceptionForTheFormatOption()
{
- throw new NotSupportedException(Strings.ALinq_FormatQueryOptionNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_FormatQueryOptionNotSupported);
}
///
@@ -2930,7 +2930,7 @@ internal override Expression VisitMethodCall(MethodCallExpression mce)
{
if (this.checkedMethod == SequenceMethod.OrderBy)
{
- throw new NotSupportedException(Strings.ALinq_AnyAllNotSupportedInOrderBy(mce.Method.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_AnyAllNotSupportedInOrderBy, mce.Method.Name));
}
Type filteredType = mce.Method.GetGenericArguments().SingleOrDefault();
@@ -2944,7 +2944,7 @@ internal override Expression VisitMethodCall(MethodCallExpression mce)
!PatternRules.MatchNonPrivateReadableProperty(me, out pi, out boundTarget) ||
!WebUtil.IsCLRTypeCollection(pi.PropertyType, this.model))
{
- throw new NotSupportedException(Strings.ALinq_InvalidSourceForAnyAll(mce.Method.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidSourceForAnyAll, mce.Method.Name));
}
}
@@ -2985,17 +2985,17 @@ internal override Expression VisitMemberAccess(MemberExpression m)
{
if (this.checkedMethod == SequenceMethod.Where)
{
- throw new NotSupportedException(Strings.ALinq_CollectionPropertyNotSupportedInWhere(pi.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CollectionPropertyNotSupportedInWhere, pi.Name));
}
else
{
- throw new NotSupportedException(Strings.ALinq_CollectionPropertyNotSupportedInOrderBy(pi.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CollectionPropertyNotSupportedInOrderBy, pi.Name));
}
}
if (typeof(DataServiceStreamLink).IsAssignableFrom(pi.PropertyType))
{
- throw new NotSupportedException(Strings.ALinq_LinkPropertyNotSupportedInExpression(pi.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_LinkPropertyNotSupportedInExpression, pi.Name));
}
}
@@ -3033,7 +3033,7 @@ internal static void DisallowMemberAccessInNavigation(Expression e, ClientEdmMod
{
if (WebUtil.IsCLRTypeCollection(me.Expression.Type, model))
{
- throw new NotSupportedException(Strings.ALinq_CollectionMemberAccessNotSupportedInNavigation(me.Member.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CollectionMemberAccessNotSupportedInNavigation, me.Member.Name));
}
me = StripTo(me.Expression);
@@ -3054,7 +3054,7 @@ internal static void DisallowExpressionEndWithTypeAs(Expression exp, string meth
Expression e = ResourceBinder.StripTo(exp);
if (e != null && e.NodeType == ExpressionType.TypeAs)
{
- throw new NotSupportedException(Strings.ALinq_ExpressionCannotEndWithTypeAs(exp.ToString(), method));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ExpressionCannotEndWithTypeAs, exp.ToString(), method));
}
}
@@ -3098,7 +3098,7 @@ internal static void ValidateExpandPath(Expression input, DataServiceContext con
}
- throw new NotSupportedException(Strings.ALinq_InvalidExpressionInNavigationPath(input));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidExpressionInNavigationPath, input));
}
///
@@ -3122,14 +3122,14 @@ internal static void ValidateAggregateExpression(Expression expr)
// member expression will result into `memberExpr` being assigned a value of null.
if (memberExpr == null)
{
- throw new NotSupportedException(Strings.ALinq_InvalidAggregateExpression(expr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidAggregateExpression, expr));
}
// Validate that property is aggregatable. Applies to CountDistinct() since Queryable
// aggregation methods (Average, Sum, Min, Max) validate that the property is aggregatable
if (!PrimitiveType.IsKnownNullableType(memberExpr.Type))
{
- throw new NotSupportedException(Strings.ALinq_InvalidAggregateExpression(expr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidAggregateExpression, expr));
}
// Member access expressions involving properties of known primitive types
@@ -3144,13 +3144,13 @@ internal static void ValidateAggregateExpression(Expression expr)
{
if (PrimitiveType.IsKnownNullableType(parentExpr.Type))
{
- throw new NotSupportedException(Strings.ALinq_InvalidAggregateExpression(expr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidAggregateExpression, expr));
}
Type collectionType = ClientTypeUtil.GetImplementationType(parentExpr.Type, typeof(ICollection<>));
if (collectionType != null)
{
- throw new NotSupportedException(Strings.ALinq_InvalidAggregateExpression(expr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidAggregateExpression, expr));
}
}
}
@@ -3177,13 +3177,13 @@ internal static void ValidateGroupingExpression(Expression expr)
{
if (PrimitiveType.IsKnownNullableType(containingExpr.Type))
{
- throw new NotSupportedException(Strings.ALinq_InvalidGroupingExpression(memberExpr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidGroupingExpression, memberExpr));
}
Type collectionType = ClientTypeUtil.GetImplementationType(containingExpr.Type, typeof(ICollection<>));
if (collectionType != null)
{
- throw new NotSupportedException(Strings.ALinq_InvalidGroupingExpression(memberExpr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidGroupingExpression, memberExpr));
}
}
@@ -3191,7 +3191,7 @@ internal static void ValidateGroupingExpression(Expression expr)
// Due to feature gap in OData WebApi
if (!PrimitiveType.IsKnownNullableType(memberExpr.Type))
{
- throw new NotSupportedException(Strings.ALinq_InvalidGroupingExpression(memberExpr));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_InvalidGroupingExpression, memberExpr));
}
}
}
diff --git a/src/Microsoft.OData.Client/ALinq/SelectExpandPathToStringVisitor.cs b/src/Microsoft.OData.Client/ALinq/SelectExpandPathToStringVisitor.cs
index b0231d9fc6..5ac4e3cf25 100644
--- a/src/Microsoft.OData.Client/ALinq/SelectExpandPathToStringVisitor.cs
+++ b/src/Microsoft.OData.Client/ALinq/SelectExpandPathToStringVisitor.cs
@@ -37,7 +37,7 @@ internal class SelectExpandPathToStringVisitor : IPathSegmentTokenVisitorAlways throws, because a system token is illegal in this case.
public string Visit(SystemToken tokenIn)
{
- throw new NotSupportedException(Strings.ALinq_IllegalSystemQueryOption(tokenIn.Identifier));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_IllegalSystemQueryOption, tokenIn.Identifier));
}
///
diff --git a/src/Microsoft.OData.Client/ALinq/UriHelper.cs b/src/Microsoft.OData.Client/ALinq/UriHelper.cs
index ba4d9289ee..4e0332ec01 100644
--- a/src/Microsoft.OData.Client/ALinq/UriHelper.cs
+++ b/src/Microsoft.OData.Client/ALinq/UriHelper.cs
@@ -214,7 +214,7 @@ internal static string GetTypeNameForUri(Type type, DataServiceContext context)
else
{
// unsupported primitive type
- throw new NotSupportedException(Strings.ALinq_CantCastToUnsupportedPrimitive(type.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantCastToUnsupportedPrimitive, type.Name));
}
}
else
@@ -235,12 +235,12 @@ internal static string GetEntityTypeNameForUriAndValidateMaxProtocolVersion(Type
if (context.MaxProtocolVersionAsVersion < Util.ODataVersion4)
{
- throw new NotSupportedException(Strings.ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3);
+ throw new NotSupportedException(SRResources.ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3);
}
if (!ClientTypeUtil.TypeOrElementTypeIsEntity(type))
{
- throw new NotSupportedException(Strings.ALinq_TypeAsArgumentNotEntityType(type.FullName));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_TypeAsArgumentNotEntityType, type.FullName));
}
// Raise the uriVersion each time we write the type segment on the uri.
diff --git a/src/Microsoft.OData.Client/ALinq/UriWriter.cs b/src/Microsoft.OData.Client/ALinq/UriWriter.cs
index aabed9dbd9..06015ce91d 100644
--- a/src/Microsoft.OData.Client/ALinq/UriWriter.cs
+++ b/src/Microsoft.OData.Client/ALinq/UriWriter.cs
@@ -112,7 +112,7 @@ internal override Expression VisitMethodCall(MethodCallExpression m)
/// The visited UnaryExpression expression
internal override Expression VisitUnary(UnaryExpression u)
{
- throw new NotSupportedException(Strings.ALinq_UnaryNotSupported(u.NodeType.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_UnaryNotSupported, u.NodeType.ToString()));
}
///
@@ -122,7 +122,7 @@ internal override Expression VisitUnary(UnaryExpression u)
/// The visited BinaryExpression expression
internal override Expression VisitBinary(BinaryExpression b)
{
- throw new NotSupportedException(Strings.ALinq_BinaryNotSupported(b.NodeType.ToString()));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_BinaryNotSupported, b.NodeType.ToString()));
}
///
@@ -132,7 +132,7 @@ internal override Expression VisitBinary(BinaryExpression b)
/// The visited ConstantExpression expression
internal override Expression VisitConstant(ConstantExpression c)
{
- throw new NotSupportedException(Strings.ALinq_ConstantNotSupported(c.Value));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_ConstantNotSupported, c.Value));
}
///
@@ -142,7 +142,7 @@ internal override Expression VisitConstant(ConstantExpression c)
/// The visited TypeBinaryExpression expression
internal override Expression VisitTypeIs(TypeBinaryExpression b)
{
- throw new NotSupportedException(Strings.ALinq_TypeBinaryNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_TypeBinaryNotSupported);
}
///
@@ -152,7 +152,7 @@ internal override Expression VisitTypeIs(TypeBinaryExpression b)
/// The visited ConditionalExpression expression
internal override Expression VisitConditional(ConditionalExpression c)
{
- throw new NotSupportedException(Strings.ALinq_ConditionalNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_ConditionalNotSupported);
}
///
@@ -162,7 +162,7 @@ internal override Expression VisitConditional(ConditionalExpression c)
/// The visited ParameterExpression expression
internal override Expression VisitParameter(ParameterExpression p)
{
- throw new NotSupportedException(Strings.ALinq_ParameterNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_ParameterNotSupported);
}
///
@@ -172,7 +172,7 @@ internal override Expression VisitParameter(ParameterExpression p)
/// The visited MemberExpression expression
internal override Expression VisitMemberAccess(MemberExpression m)
{
- throw new NotSupportedException(Strings.ALinq_MemberAccessNotSupported(m.Member.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_MemberAccessNotSupported, m.Member.Name));
}
///
@@ -182,7 +182,7 @@ internal override Expression VisitMemberAccess(MemberExpression m)
/// The visited LambdaExpression
internal override Expression VisitLambda(LambdaExpression lambda)
{
- throw new NotSupportedException(Strings.ALinq_LambdaNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_LambdaNotSupported);
}
///
@@ -192,7 +192,7 @@ internal override Expression VisitLambda(LambdaExpression lambda)
/// The visited NewExpression
internal override NewExpression VisitNew(NewExpression nex)
{
- throw new NotSupportedException(Strings.ALinq_NewNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_NewNotSupported);
}
///
@@ -202,7 +202,7 @@ internal override NewExpression VisitNew(NewExpression nex)
/// The visited MemberInitExpression
internal override Expression VisitMemberInit(MemberInitExpression init)
{
- throw new NotSupportedException(Strings.ALinq_MemberInitNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_MemberInitNotSupported);
}
///
@@ -212,7 +212,7 @@ internal override Expression VisitMemberInit(MemberInitExpression init)
/// The visited ListInitExpression
internal override Expression VisitListInit(ListInitExpression init)
{
- throw new NotSupportedException(Strings.ALinq_ListInitNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_ListInitNotSupported);
}
///
@@ -222,7 +222,7 @@ internal override Expression VisitListInit(ListInitExpression init)
/// The visited NewArrayExpression
internal override Expression VisitNewArray(NewArrayExpression na)
{
- throw new NotSupportedException(Strings.ALinq_NewArrayNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_NewArrayNotSupported);
}
///
@@ -232,7 +232,7 @@ internal override Expression VisitNewArray(NewArrayExpression na)
/// The visited InvocationExpression
internal override Expression VisitInvocation(InvocationExpression iv)
{
- throw new NotSupportedException(Strings.ALinq_InvocationNotSupported);
+ throw new NotSupportedException(SRResources.ALinq_InvocationNotSupported);
}
///
@@ -689,7 +689,7 @@ private string ConstructAggregateTransformation(IList f == null || f.Length == 0))
{
- throw Error.Argument(Strings.DSKAttribute_MustSpecifyAtleastOnePropertyName, "keyNames");
+ throw Error.Argument(SRResources.DSKAttribute_MustSpecifyAtleastOnePropertyName, "keyNames");
}
this.keyNames = new ReadOnlyCollection(keyNames);
diff --git a/src/Microsoft.OData.Client/BaseAsyncResult.cs b/src/Microsoft.OData.Client/BaseAsyncResult.cs
index 10502e8aad..5e2ef7ee91 100644
--- a/src/Microsoft.OData.Client/BaseAsyncResult.cs
+++ b/src/Microsoft.OData.Client/BaseAsyncResult.cs
@@ -219,7 +219,7 @@ internal static T EndExecute(object source, string method, IAsyncResult async
T result = (asyncResult as T);
if ((result == null) || (source != result.Source) || (result.Method != method))
{
- throw Error.Argument(Strings.Context_DidNotOriginateAsync, "asyncResult");
+ throw Error.Argument(SRResources.Context_DidNotOriginateAsync, "asyncResult");
}
Debug.Assert((result.CompletedSynchronously && result.IsCompleted) || !result.CompletedSynchronously, "CompletedSynchronously && !IsCompleted");
@@ -234,7 +234,7 @@ internal static T EndExecute(object source, string method, IAsyncResult async
// Prevent EndExecute from being called more than once.
if (Interlocked.Exchange(ref result.done, 1) != 0)
{
- throw Error.Argument(Strings.Context_AsyncAlreadyDone, "asyncResult");
+ throw Error.Argument(SRResources.Context_AsyncAlreadyDone, "asyncResult");
}
// Dispose the wait handle.
@@ -250,7 +250,7 @@ internal static T EndExecute(object source, string method, IAsyncResult async
if (result.IsAborted)
{
- throw Error.InvalidOperation(Strings.Context_OperationCanceled);
+ throw Error.InvalidOperation(SRResources.Context_OperationCanceled);
}
if (result.Failure != null)
@@ -260,7 +260,7 @@ internal static T EndExecute(object source, string method, IAsyncResult async
throw result.Failure;
}
- throw Error.InvalidOperation(Strings.DataServiceException_GeneralError, result.Failure);
+ throw Error.InvalidOperation(SRResources.DataServiceException_GeneralError, result.Failure);
}
return result;
diff --git a/src/Microsoft.OData.Client/BaseSaveResult.cs b/src/Microsoft.OData.Client/BaseSaveResult.cs
index 315699bdb5..530d92de69 100644
--- a/src/Microsoft.OData.Client/BaseSaveResult.cs
+++ b/src/Microsoft.OData.Client/BaseSaveResult.cs
@@ -203,7 +203,7 @@ internal static InvalidOperationException HandleResponse(
InvalidOperationException failure = null;
if (!CanHandleResponseVersion(responseVersion, out parsedResponseVersion))
{
- string description = Strings.Context_VersionNotSupported(responseVersion, SerializeSupportedVersions());
+ string description = Error.Format(SRResources.Context_VersionNotSupported, responseVersion, SerializeSupportedVersions());
failure = Error.InvalidOperation(description);
}
@@ -593,7 +593,7 @@ protected void HandleOperationResponseHeaders(HttpStatusCode statusCode, HeaderC
// Except for preflight requests
if (headers.HasHeader("Content-Type") && statusCode != HttpStatusCode.Created)
{
- throw Error.NotSupported(Strings.Deserialize_NoLocationHeader);
+ throw Error.NotSupported(SRResources.Deserialize_NoLocationHeader);
}
}
@@ -606,7 +606,7 @@ protected void HandleOperationResponseHeaders(HttpStatusCode statusCode, HeaderC
odataId = WebUtil.ValidateIdentityValue(odataEntityId);
if (location == null)
{
- throw Error.NotSupported(Strings.Context_BothLocationAndIdMustBeSpecified);
+ throw Error.NotSupported(SRResources.Context_BothLocationAndIdMustBeSpecified);
}
}
else
@@ -1065,14 +1065,14 @@ private static void ValidateLinkDescriptorSourceAndTargetHaveIdentities(LinkDesc
{
binding.ContentGeneratedForSave = true;
Debug.Assert(EntityStates.Added == sourceResource.State, "expected added state");
- throw Error.InvalidOperation(Strings.Context_LinkResourceInsertFailure, sourceResource.SaveError);
+ throw Error.InvalidOperation(SRResources.Context_LinkResourceInsertFailure, sourceResource.SaveError);
}
if (targetResource != null && targetResource.GetLatestIdentity() == null)
{
binding.ContentGeneratedForSave = true;
Debug.Assert(targetResource.State == EntityStates.Added, "expected added state");
- throw Error.InvalidOperation(Strings.Context_LinkResourceInsertFailure, targetResource.SaveError);
+ throw Error.InvalidOperation(SRResources.Context_LinkResourceInsertFailure, targetResource.SaveError);
}
}
diff --git a/src/Microsoft.OData.Client/BatchSaveResult.cs b/src/Microsoft.OData.Client/BatchSaveResult.cs
index 9cb8f2b3ca..033e9706dd 100644
--- a/src/Microsoft.OData.Client/BatchSaveResult.cs
+++ b/src/Microsoft.OData.Client/BatchSaveResult.cs
@@ -405,7 +405,7 @@ private ODataRequestMessageWrapper GenerateBatchRequest()
ClientTypeAnnotation type = model.GetClientTypeAnnotation(model.GetOrCreateEdmType(entityDescriptor.Entity.GetType()));
if (type.IsMediaLinkEntry || entityDescriptor.IsMediaLinkEntry)
{
- throw Error.NotSupported(Strings.Context_BatchNotSupportedForMediaLink);
+ throw Error.NotSupported(SRResources.Context_BatchNotSupportedForMediaLink);
}
}
else if (entityDescriptor.State == EntityStates.Unchanged || entityDescriptor.State == EntityStates.Modified)
@@ -414,14 +414,14 @@ private ODataRequestMessageWrapper GenerateBatchRequest()
// It's OK to PUT the MLE alone inside a batch mode though
if (entityDescriptor.SaveStream != null)
{
- throw Error.NotSupported(Strings.Context_BatchNotSupportedForMediaLink);
+ throw Error.NotSupported(SRResources.Context_BatchNotSupportedForMediaLink);
}
}
}
else if (descriptor.DescriptorKind == DescriptorKind.NamedStream)
{
// Similar to MR, we do not support adding named streams in batch mode.
- throw Error.NotSupported(Strings.Context_BatchNotSupportedForNamedStreams);
+ throw Error.NotSupported(SRResources.Context_BatchNotSupportedForNamedStreams);
}
ODataRequestMessageWrapper operationRequestMessage;
@@ -471,7 +471,7 @@ private DataServiceResponse HandleBatchResponse()
{
if ((this.batchResponseMessage == null) || (this.batchResponseMessage.StatusCode == (int)HttpStatusCode.NoContent))
{ // we always expect a response to our batch POST request
- throw Error.InvalidOperation(Strings.Batch_ExpectedResponse(1));
+ throw Error.InvalidOperation(Error.Format(SRResources.Batch_ExpectedResponse, 1));
}
Func getResponseStream = () => this.ResponseStream;
@@ -519,7 +519,7 @@ private DataServiceResponse HandleBatchResponse()
(HttpStatusCode)this.batchResponseMessage.StatusCode);
}
- throw Error.InvalidOperation(Strings.Batch_ExpectedContentType(this.batchResponseMessage.GetHeader(XmlConstants.HttpContentType)), inner);
+ throw Error.InvalidOperation(Error.Format(SRResources.Batch_ExpectedContentType, this.batchResponseMessage.GetHeader(XmlConstants.HttpContentType)), inner);
}
DataServiceResponse response = this.HandleBatchResponseInternal(batchReader);
@@ -541,7 +541,7 @@ private DataServiceResponse HandleBatchResponse()
HeaderCollection headers = new HeaderCollection(this.batchResponseMessage);
int statusCode = this.batchResponseMessage == null ? (int)HttpStatusCode.InternalServerError : (int)this.batchResponseMessage.StatusCode;
DataServiceResponse response = new DataServiceResponse(headers, statusCode, Enumerable.Empty(), this.IsBatchRequest);
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, ex, response);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, ex, response);
}
finally
{
@@ -608,7 +608,7 @@ private DataServiceResponse HandleBatchResponseInternal(ODataBatchReader batchRe
// Users need to inspect each OperationResponse to get the exception information from the failed operations.
if (exception != null)
{
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, exception, response);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, exception, response);
}
}
@@ -810,7 +810,7 @@ private IEnumerable HandleBatchResponse(ODataBatchReader batc
(!this.IsBatchRequest || this.ChangedEntries.FirstOrDefault(o => o.SaveError != null) == null))) ||
(this.Queries != null && queryCount != this.Queries.Length))
{
- throw Error.InvalidOperation(Strings.Batch_IncompleteResponseCount);
+ throw Error.InvalidOperation(SRResources.Batch_IncompleteResponseCount);
}
}
finally
diff --git a/src/Microsoft.OData.Client/Binding/BindingGraph.cs b/src/Microsoft.OData.Client/Binding/BindingGraph.cs
index 3bae1dbca3..5dab1ada4e 100644
--- a/src/Microsoft.OData.Client/Binding/BindingGraph.cs
+++ b/src/Microsoft.OData.Client/Binding/BindingGraph.cs
@@ -97,7 +97,7 @@ public bool AddDataServiceCollection(
// Fail if the collection entity type does not implement INotifyPropertyChanged.
if (!typeof(INotifyPropertyChanged).IsAssignableFrom(entityType))
{
- throw new InvalidOperationException(Strings.DataBinding_NotifyPropertyChangedNotImpl(entityType));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_NotifyPropertyChangedNotImpl, entityType));
}
typeof(BindingGraph)
@@ -164,7 +164,7 @@ public void AddPrimitiveOrComplexCollection(
// Attach CollectionChanged event listener and fail if the collection type doesn't support notification
if (!this.AttachPrimitiveOrComplexCollectionNotification(collection))
{
- throw new InvalidOperationException(Strings.DataBinding_NotifyCollectionChangedNotImpl(collection.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_NotifyCollectionChangedNotImpl, collection.GetType()));
}
// If the collection contains complex objects, bind to all of the objects in the collection
@@ -173,7 +173,7 @@ public void AddPrimitiveOrComplexCollection(
// Fail if the collection contains a complex type that does not implement INotifyPropertyChanged.
if (!typeof(INotifyPropertyChanged).IsAssignableFrom(collectionItemType))
{
- throw new InvalidOperationException(Strings.DataBinding_NotifyPropertyChangedNotImpl(collectionItemType));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_NotifyPropertyChangedNotImpl, collectionItemType));
}
// Recursively bind to all of the complex objects in the collection and any nested complex objects or collections
@@ -182,7 +182,7 @@ public void AddPrimitiveOrComplexCollection(
}
else
{
- throw new InvalidOperationException(Strings.DataBinding_CollectionAssociatedWithMultipleEntities(collection.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_CollectionAssociatedWithMultipleEntities, collection.GetType()));
}
}
@@ -227,7 +227,7 @@ public bool AddEntity(
// Register for entity notifications, fail if the entity does not implement INotifyPropertyChanged.
if (!this.AttachEntityOrComplexObjectNotification(target))
{
- throw new InvalidOperationException(Strings.DataBinding_NotifyPropertyChangedNotImpl(target.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_NotifyPropertyChangedNotImpl, target.GetType()));
}
addedNewEntity = true;
@@ -236,7 +236,7 @@ public bool AddEntity(
// Add relationship. Connect the from end to the target.
if (this.graph.ExistsEdge(edgeSource, target, sourceVertex.IsDataServiceCollection ? null : sourceProperty))
{
- throw new InvalidOperationException(Strings.DataBinding_EntityAlreadyInCollection(target.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_EntityAlreadyInCollection, target.GetType()));
}
this.graph.AddEdge(edgeSource, target, sourceVertex.IsDataServiceCollection ? null : sourceProperty);
@@ -538,7 +538,7 @@ public void AddComplexObject(object source, string sourceProperty, object target
// Register for complex type notifications, fail if the complex type does not implement INotifyPropertyChanged.
if (!this.AttachEntityOrComplexObjectNotification(target))
{
- throw new InvalidOperationException(Strings.DataBinding_NotifyPropertyChangedNotImpl(target.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_NotifyPropertyChangedNotImpl, target.GetType()));
}
this.graph.AddEdge(source, target, sourceProperty);
@@ -548,7 +548,7 @@ public void AddComplexObject(object source, string sourceProperty, object target
}
else
{
- throw new InvalidOperationException(Strings.DataBinding_ComplexObjectAssociatedWithMultipleEntities(target.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_ComplexObjectAssociatedWithMultipleEntities, target.GetType()));
}
}
diff --git a/src/Microsoft.OData.Client/Binding/BindingObserver.cs b/src/Microsoft.OData.Client/Binding/BindingObserver.cs
index 5bcc73753d..1e22e4f4ba 100644
--- a/src/Microsoft.OData.Client/Binding/BindingObserver.cs
+++ b/src/Microsoft.OData.Client/Binding/BindingObserver.cs
@@ -504,7 +504,7 @@ internal void HandleAddEntity(
// The user callback code could detach the source.
if (source != null && this.IsDetachedOrDeletedFromContext(source))
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_DetachedSource);
+ throw new InvalidOperationException(SRResources.DataBinding_BindingOperation_DetachedSource);
}
// Default implementation.
@@ -638,7 +638,7 @@ internal void HandleDeleteEntity(
// The user callback code could detach the source.
if (source != null && !this.IsContextTrackingEntity(source))
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_DetachedSource);
+ throw new InvalidOperationException(SRResources.DataBinding_BindingOperation_DetachedSource);
}
// Default implementation.
@@ -718,7 +718,7 @@ internal void HandleUpdateEntityReference(
// The user callback code could detach the source.
if (this.IsDetachedOrDeletedFromContext(source))
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_DetachedSource);
+ throw new InvalidOperationException(SRResources.DataBinding_BindingOperation_DetachedSource);
}
// Default implementation.
@@ -873,12 +873,12 @@ private void OnAddToDataServiceCollection(
{
if (target == null)
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_ArrayItemNull("Add"));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_BindingOperation_ArrayItemNull, "Add"));
}
if (!BindingEntityInfo.IsEntityType(target.GetType(), this.Context.Model))
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_ArrayItemNotEntity("Add"));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_BindingOperation_ArrayItemNotEntity, "Add"));
}
// Start tracking the target entity and synchronize the context with the Add operation.
@@ -1088,12 +1088,12 @@ private void ValidateDataServiceCollectionItem(object target)
{
if (target == null)
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_ArrayItemNull("Remove"));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_BindingOperation_ArrayItemNull, "Remove"));
}
if (!BindingEntityInfo.IsEntityType(target.GetType(), this.Context.Model))
{
- throw new InvalidOperationException(Strings.DataBinding_BindingOperation_ArrayItemNotEntity("Remove"));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_BindingOperation_ArrayItemNotEntity, "Remove"));
}
}
diff --git a/src/Microsoft.OData.Client/Binding/BindingUtils.cs b/src/Microsoft.OData.Client/Binding/BindingUtils.cs
index 702a570e37..0e40da6dd3 100644
--- a/src/Microsoft.OData.Client/Binding/BindingUtils.cs
+++ b/src/Microsoft.OData.Client/Binding/BindingUtils.cs
@@ -24,7 +24,7 @@ internal static void ValidateEntitySetName(string entitySetName, object entity)
{
if (String.IsNullOrEmpty(entitySetName))
{
- throw new InvalidOperationException(Strings.DataBinding_Util_UnknownEntitySetName(entity.GetType().FullName));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_Util_UnknownEntitySetName, entity.GetType().FullName));
}
}
@@ -72,7 +72,7 @@ internal static void VerifyObserverNotPresent(object oec, string sourceProper
if (typedCollection.Observer != null)
{
- throw new InvalidOperationException(Strings.DataBinding_CollectionPropertySetterValueHasObserver(sourceProperty, sourceType));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_CollectionPropertySetterValueHasObserver, sourceProperty, sourceType));
}
}
}
diff --git a/src/Microsoft.OData.Client/Binding/DataServiceCollectionOfT.cs b/src/Microsoft.OData.Client/Binding/DataServiceCollectionOfT.cs
index 26ad54d5cb..9bb8a3293e 100644
--- a/src/Microsoft.OData.Client/Binding/DataServiceCollectionOfT.cs
+++ b/src/Microsoft.OData.Client/Binding/DataServiceCollectionOfT.cs
@@ -316,12 +316,12 @@ public void LoadAsync(System.Linq.IQueryable query)
DataServiceQuery dsq = query as DataServiceQuery;
if (dsq == null)
{
- throw new ArgumentException(Strings.DataServiceCollection_LoadAsyncRequiresDataServiceQuery, nameof(query));
+ throw new ArgumentException(SRResources.DataServiceCollection_LoadAsyncRequiresDataServiceQuery, nameof(query));
}
if (this.ongoingAsyncOperation != null)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
}
if (this.trackingOnLoad)
@@ -358,12 +358,12 @@ public void LoadAsync(Uri requestUri)
if (!this.IsTracking)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_OperationForTrackedOnly);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_OperationForTrackedOnly);
}
if (this.ongoingAsyncOperation != null)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
}
DataServiceContext context = this.observer.Context;
@@ -392,19 +392,19 @@ public void LoadAsync()
{
if (!this.IsTracking)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_OperationForTrackedOnly);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_OperationForTrackedOnly);
}
object parent;
string property;
if (!this.observer.LookupParent(this, out parent, out property))
{
- throw new InvalidOperationException(Strings.DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity);
}
if (this.ongoingAsyncOperation != null)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
}
this.BeginLoadAsyncOperation(
@@ -428,12 +428,12 @@ public bool LoadNextPartialSetAsync()
{
if (!this.IsTracking)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_OperationForTrackedOnly);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_OperationForTrackedOnly);
}
if (this.ongoingAsyncOperation != null)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
}
if (this.Continuation == null)
@@ -504,7 +504,7 @@ public void Clear(bool stopTracking)
{
if (!this.IsTracking)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_OperationForTrackedOnly);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_OperationForTrackedOnly);
}
if (!stopTracking)
@@ -536,13 +536,13 @@ public void Detach()
{
if (!this.IsTracking)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_OperationForTrackedOnly);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_OperationForTrackedOnly);
}
// Operation only allowed on root collections.
if (!this.rootCollection)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_CannotStopTrackingChildCollection);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_CannotStopTrackingChildCollection);
}
this.observer.StopTracking();
@@ -562,7 +562,7 @@ protected override void InsertItem(int index, T item)
{
if (this.trackingOnLoad)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_InsertIntoTrackedButNotLoadedCollection);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_InsertIntoTrackedButNotLoadedCollection);
}
if (this.IsTracking && item != null)
@@ -570,7 +570,7 @@ protected override void InsertItem(int index, T item)
INotifyPropertyChanged notify = item as INotifyPropertyChanged;
if (notify == null)
{
- throw new InvalidOperationException(Strings.DataBinding_NotifyPropertyChangedNotImpl(item.GetType()));
+ throw new InvalidOperationException(Error.Format(SRResources.DataBinding_NotifyPropertyChangedNotImpl, item.GetType()));
}
}
@@ -615,7 +615,7 @@ private static DataServiceContext GetContextFromItems(IEnumerable items)
return context;
}
- throw new ArgumentException(Strings.DataServiceCollection_CannotDetermineContextFromItems);
+ throw new ArgumentException(SRResources.DataServiceCollection_CannotDetermineContextFromItems);
}
///
@@ -665,7 +665,7 @@ private void StartLoading()
// Observer must be present on the target collection which implies that the operation would fail on default constructed objects.
if (this.observer.Context == null)
{
- throw new InvalidOperationException(Strings.DataServiceCollection_LoadRequiresTargetCollectionObserved);
+ throw new InvalidOperationException(SRResources.DataServiceCollection_LoadRequiresTargetCollectionObserved);
}
this.observer.AttachBehavior = true;
@@ -705,7 +705,7 @@ private void StartTracking(
// Validate here before any items are added to the collection because if this fails we want to prevent the collection from being populated.
if (!BindingEntityInfo.IsEntityType(typeof(T), context.Model))
{
- throw new ArgumentException(Strings.DataBinding_DataServiceCollectionArgumentMustHaveEntityType(typeof(T)));
+ throw new ArgumentException(Error.Format(SRResources.DataBinding_DataServiceCollectionArgumentMustHaveEntityType, typeof(T)));
}
// Set up the observer first because we want the collection to know it's supposed to be tracked while the items are being loaded.
diff --git a/src/Microsoft.OData.Client/BulkUpdateGraph.cs b/src/Microsoft.OData.Client/BulkUpdateGraph.cs
index e1e38e2b67..9f538a5702 100644
--- a/src/Microsoft.OData.Client/BulkUpdateGraph.cs
+++ b/src/Microsoft.OData.Client/BulkUpdateGraph.cs
@@ -93,7 +93,7 @@ private void ComputeEntitySetName()
}
else
{
- throw Error.InvalidOperation(Strings.DataBinding_Util_UnknownEntitySetName(parentDescriptor.Entity.GetType().FullName));
+ throw Error.InvalidOperation(Error.Format(SRResources.DataBinding_Util_UnknownEntitySetName, parentDescriptor.Entity.GetType().FullName));
}
}
}
diff --git a/src/Microsoft.OData.Client/BulkUpdateSaveResult.cs b/src/Microsoft.OData.Client/BulkUpdateSaveResult.cs
index 7c42e724b8..cf3a781257 100644
--- a/src/Microsoft.OData.Client/BulkUpdateSaveResult.cs
+++ b/src/Microsoft.OData.Client/BulkUpdateSaveResult.cs
@@ -112,7 +112,7 @@ internal void BeginBulkUpdateRequest(params T[] objects)
if (objects == null || objects.Length == 0)
{
- throw Error.Argument(Strings.Util_EmptyArray, nameof(objects));
+ throw Error.Argument(SRResources.Util_EmptyArray, nameof(objects));
}
BuildDescriptorGraph(this.ChangedEntries, true, objects);
@@ -169,7 +169,7 @@ internal void BulkUpdateRequest(params T[] objects)
{
if (objects == null || objects.Length == 0)
{
- throw Error.Argument(Strings.Util_EmptyArray, nameof(objects));
+ throw Error.Argument(SRResources.Util_EmptyArray, nameof(objects));
}
BuildDescriptorGraph(this.ChangedEntries, true, objects);
@@ -241,7 +241,7 @@ internal void BuildDescriptorGraph(IEnumerable descriptors, bool
// for any of the provided objects then we throw an exception.
if (topLevelDescriptor == null)
{
- throw Error.InvalidOperation(Strings.Context_EntityNotContained);
+ throw Error.InvalidOperation(SRResources.Context_EntityNotContained);
}
// If it is a top-level object,
@@ -418,7 +418,7 @@ protected override DataServiceResponse HandleResponse()
if (this.cachedResponse.Exception != null)
{
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, this.cachedResponse.Exception, dataServiceResponse);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, this.cachedResponse.Exception, dataServiceResponse);
}
Stack<(int LastVisited, IReadOnlyList Descriptors)> adjacentDescriptors = new Stack<(int LastVisited, IReadOnlyList Descriptors)>();
@@ -693,7 +693,7 @@ private void CreateOperationResponse(
if (ex != null)
{
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, ex, dataServiceResponse);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, ex, dataServiceResponse);
}
}
diff --git a/src/Microsoft.OData.Client/ClientConvert.cs b/src/Microsoft.OData.Client/ClientConvert.cs
index 97f5364bad..5a631a2497 100644
--- a/src/Microsoft.OData.Client/ClientConvert.cs
+++ b/src/Microsoft.OData.Client/ClientConvert.cs
@@ -42,12 +42,12 @@ internal static object ChangeType(string propertyValue, Type propertyType)
catch (FormatException ex)
{
propertyValue = propertyValue.Length == 0 ? "String.Empty" : "String";
- throw Error.InvalidOperation(Strings.Deserialize_Current(propertyType.ToString(), propertyValue), ex);
+ throw Error.InvalidOperation(Error.Format(SRResources.Deserialize_Current, propertyType.ToString(), propertyValue), ex);
}
catch (OverflowException ex)
{
propertyValue = propertyValue.Length == 0 ? "String.Empty" : "String";
- throw Error.InvalidOperation(Strings.Deserialize_Current(propertyType.ToString(), propertyValue), ex);
+ throw Error.InvalidOperation(Error.Format(SRResources.Deserialize_Current, propertyType.ToString(), propertyValue), ex);
}
}
else
@@ -163,7 +163,7 @@ internal static string GetEdmType(Type propertyType)
// don't support reverse mappings for these types in this version
// allows us to add real server support in the future without a
// "breaking change" in the future client
- throw new NotSupportedException(Strings.ALinq_CantCastToUnsupportedPrimitive(propertyType.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantCastToUnsupportedPrimitive, propertyType.Name));
}
}
else
diff --git a/src/Microsoft.OData.Client/ClientEdmModel.cs b/src/Microsoft.OData.Client/ClientEdmModel.cs
index fd052abb4d..23cea3b158 100644
--- a/src/Microsoft.OData.Client/ClientEdmModel.cs
+++ b/src/Microsoft.OData.Client/ClientEdmModel.cs
@@ -353,7 +353,7 @@ private void ValidateComplexType(Type type, EdmTypeCacheValue cachedEdmType)
if (hasProperties == false && (type == typeof(System.Object) || type.IsGenericType()))
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_NoSettableFields(type.ToString()));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_NoSettableFields, type.ToString()));
}
}
}
@@ -371,13 +371,13 @@ private void SetMimeTypeForProperties(IEdmStructuredType edmStructuredType)
IEdmProperty dataProperty = edmStructuredType.Properties().SingleOrDefault(p => p.Name == attribute.DataPropertyName);
if (dataProperty == null)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_MissingMimeTypeDataProperty(this.GetClientTypeAnnotation(edmStructuredType).ElementTypeName, attribute.DataPropertyName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingMimeTypeDataProperty, this.GetClientTypeAnnotation(edmStructuredType).ElementTypeName, attribute.DataPropertyName));
}
IEdmProperty mimeTypeProperty = edmStructuredType.Properties().SingleOrDefault(p => p.Name == attribute.MimeTypePropertyName);
if (mimeTypeProperty == null)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_MissingMimeTypeProperty(this.GetClientTypeAnnotation(edmStructuredType).ElementTypeName, attribute.MimeTypePropertyName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingMimeTypeProperty, this.GetClientTypeAnnotation(edmStructuredType).ElementTypeName, attribute.MimeTypePropertyName));
}
this.GetClientPropertyAnnotation(dataProperty).MimeTypeProperty = this.GetClientPropertyAnnotation(mimeTypeProperty);
@@ -438,7 +438,7 @@ private EdmTypeCacheValue GetOrCreateEdmTypeInternal(IEdmStructuredType edmBaseT
// 2. will also throw during SaveChanges(), validated by unit test case 'SerializationOfCollection'in CollectionTests.cs.
if ((itemType.TypeKind == EdmTypeKind.Collection))
{
- throw new ODataException(Strings.ClientType_CollectionOfCollectionNotSupported);
+ throw new ODataException(SRResources.ClientType_CollectionOfCollectionNotSupported);
}
cachedEdmType = new EdmTypeCacheValue(new EdmCollectionType(itemType.ToEdmTypeReference(ClientTypeUtil.CanAssignNull(elementType))), hasProperties);
@@ -602,7 +602,7 @@ private IEdmProperty CreateEdmProperty(IEdmStructuredType declaringType, Propert
{
if (declaringType as IEdmEntityType == null && declaringType as IEdmComplexType == null)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientTypeCache_NonEntityTypeCannotContainEntityProperties(propertyInfo.Name, propertyInfo.DeclaringType.ToString()));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientTypeCache_NonEntityTypeCannotContainEntityProperties, propertyInfo.Name, propertyInfo.DeclaringType.ToString()));
}
// Create a navigation property representing one side of an association.
@@ -653,7 +653,7 @@ private ClientTypeAnnotation GetOrCreateClientTypeAnnotation(IEdmType edmType, T
qualifiedName = type.AssemblyQualifiedName;
if (this.typeNameToClientTypeAnnotationCache.TryGetValue(qualifiedName, out clientTypeAnnotation) && clientTypeAnnotation.ElementType != type)
{
- throw Client.Error.InvalidOperation(Strings.ClientType_MultipleTypesWithSameName(qualifiedName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_MultipleTypesWithSameName, qualifiedName));
}
}
diff --git a/src/Microsoft.OData.Client/Common.cs b/src/Microsoft.OData.Client/Common.cs
index d8626ea74c..a197cbe5e2 100644
--- a/src/Microsoft.OData.Client/Common.cs
+++ b/src/Microsoft.OData.Client/Common.cs
@@ -95,9 +95,9 @@ internal static string GetCollectionItemTypeName(string typeName, bool isNested)
if (isNested)
{
#if ODATA_CLIENT
- throw Error.InvalidOperation(Strings.ClientType_CollectionOfCollectionNotSupported);
+ throw Error.InvalidOperation(SRResources.ClientType_CollectionOfCollectionNotSupported);
#else
- throw DataServiceException.CreateBadRequestError(Strings.BadRequest_CollectionOfCollectionNotSupported);
+ throw DataServiceException.CreateBadRequestError(SRResources.BadRequest_CollectionOfCollectionNotSupported);
#endif
}
diff --git a/src/Microsoft.OData.Client/ContentTypeUtil.cs b/src/Microsoft.OData.Client/ContentTypeUtil.cs
index 6ce12aeb4f..7d1858d86f 100644
--- a/src/Microsoft.OData.Client/ContentTypeUtil.cs
+++ b/src/Microsoft.OData.Client/ContentTypeUtil.cs
@@ -250,7 +250,7 @@ internal static string SelectRequiredMimeType(
if (!acceptable && !acceptTypesEmpty)
{
- throw Error.HttpHeaderFailure(415, Strings.DataServiceException_UnsupportedMediaType);
+ throw Error.HttpHeaderFailure(415, SRResources.DataServiceException_UnsupportedMediaType);
}
if (acceptTypesEmpty)
@@ -405,7 +405,7 @@ internal static MediaParameter[] ReadContentType(string contentType, out string
{
if (String.IsNullOrEmpty(contentType))
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_ContentTypeMissing);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_ContentTypeMissing);
}
MediaType mediaType = ReadMediaType(contentType);
@@ -447,7 +447,7 @@ internal static MediaParameter[] ReadContentType(string contentType, out string
{
if (String.IsNullOrEmpty(contentType))
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_ContentTypeMissing);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_ContentTypeMissing);
}
MediaType mediaType = ReadMediaType(contentType);
@@ -485,7 +485,7 @@ private static Encoding EncodingFromName(string name)
catch (ArgumentException)
{
// 400 - Bad Request
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_EncodingNotSupported(name));
+ throw Error.HttpHeaderFailure(400, Error.Format(SRResources.HttpProcessUtility_EncodingNotSupported, name));
}
}
@@ -773,12 +773,12 @@ private static void ReadMediaTypeAndSubtype(string text, ref int textIndex, out
int textStart = textIndex;
if (ReadToken(text, ref textIndex))
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_MediaTypeUnspecified);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_MediaTypeUnspecified);
}
if (text[textIndex] != '/')
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_MediaTypeRequiresSlash);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_MediaTypeRequiresSlash);
}
type = text.Substring(textStart, textIndex - textStart);
@@ -789,7 +789,7 @@ private static void ReadMediaTypeAndSubtype(string text, ref int textIndex, out
if (textIndex == subTypeStart)
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_MediaTypeRequiresSubType);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_MediaTypeRequiresSubType);
}
subType = text.Substring(subTypeStart, textIndex - subTypeStart);
@@ -813,7 +813,7 @@ private static MediaType ReadMediaType(string text)
{
if (text[textIndex] != ';')
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter);
}
textIndex++;
@@ -876,13 +876,13 @@ private static void ReadMediaTypeParameter(string text, ref int textIndex, ref M
int startIndex = textIndex;
if (ReadToken(text, ref textIndex))
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_MediaTypeMissingValue);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_MediaTypeMissingValue);
}
string parameterName = text.Substring(startIndex, textIndex - startIndex);
if (text[textIndex] != '=')
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_MediaTypeMissingValue);
+ throw Error.HttpHeaderFailure(400, SRResources.HttpProcessUtility_MediaTypeMissingValue);
}
textIndex++;
@@ -936,7 +936,7 @@ private static MediaParameter ReadQuotedParameterValue(string parameterName, str
{
if (!valueIsQuoted)
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_EscapeCharWithoutQuotes(parameterName));
+ throw Error.HttpHeaderFailure(400, Error.Format(SRResources.HttpProcessUtility_EscapeCharWithoutQuotes, parameterName));
}
textIndex++;
@@ -950,7 +950,7 @@ private static MediaParameter ReadQuotedParameterValue(string parameterName, str
if (textIndex >= headerText.Length)
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_EscapeCharAtEnd(parameterName));
+ throw Error.HttpHeaderFailure(400, Error.Format(SRResources.HttpProcessUtility_EscapeCharAtEnd, parameterName));
}
currentChar = headerText[textIndex];
@@ -968,7 +968,7 @@ private static MediaParameter ReadQuotedParameterValue(string parameterName, str
if (valueIsQuoted)
{
- throw Error.HttpHeaderFailure(400, Strings.HttpProcessUtility_ClosingQuoteNotFound(parameterName));
+ throw Error.HttpHeaderFailure(400, Error.Format(SRResources.HttpProcessUtility_ClosingQuoteNotFound, parameterName));
}
return new MediaParameter(parameterName, parameterValue.ToString(), isQuoted);
diff --git a/src/Microsoft.OData.Client/DataServiceClientException.cs b/src/Microsoft.OData.Client/DataServiceClientException.cs
index 0b7a5185e6..75cd938132 100644
--- a/src/Microsoft.OData.Client/DataServiceClientException.cs
+++ b/src/Microsoft.OData.Client/DataServiceClientException.cs
@@ -24,7 +24,7 @@ public sealed class DataServiceClientException : InvalidOperationException
/// Initializes a new instance of the class with a system-supplied message that describes the error.
public DataServiceClientException()
- : this(Strings.DataServiceException_GeneralError)
+ : this(SRResources.DataServiceException_GeneralError)
{
}
diff --git a/src/Microsoft.OData.Client/DataServiceClientFormat.cs b/src/Microsoft.OData.Client/DataServiceClientFormat.cs
index 668f4d1e3e..b940a1d2de 100644
--- a/src/Microsoft.OData.Client/DataServiceClientFormat.cs
+++ b/src/Microsoft.OData.Client/DataServiceClientFormat.cs
@@ -123,7 +123,7 @@ public void UseJson()
{
if (this.ServiceModel == null)
{
- throw new InvalidOperationException(Strings.DataServiceClientFormat_LoadServiceModelRequired);
+ throw new InvalidOperationException(SRResources.DataServiceClientFormat_LoadServiceModelRequired);
}
this.ODataFormat = ODataFormat.Json;
diff --git a/src/Microsoft.OData.Client/DataServiceClientRequestPipelineConfiguration.cs b/src/Microsoft.OData.Client/DataServiceClientRequestPipelineConfiguration.cs
index 16b6d57896..0bbb4d5bfb 100644
--- a/src/Microsoft.OData.Client/DataServiceClientRequestPipelineConfiguration.cs
+++ b/src/Microsoft.OData.Client/DataServiceClientRequestPipelineConfiguration.cs
@@ -10,7 +10,6 @@ namespace Microsoft.OData.Client
using System.Collections.Generic;
using System.Diagnostics;
using Microsoft.OData;
- using ClientStrings = Microsoft.OData.Client.Strings;
///
/// Class that holds a variety of events for writing the payload from the OData to the wire
@@ -66,7 +65,7 @@ public Func
@@ -1016,7 +1014,7 @@ public virtual void CancelRequest(IAsyncResult asyncResult)
if (context != this)
{
- throw Error.Argument(Strings.Context_DidNotOriginateAsync, "asyncResult");
+ throw Error.Argument(SRResources.Context_DidNotOriginateAsync, "asyncResult");
}
}
@@ -1374,14 +1372,14 @@ private EntityDescriptor GetEntityDescriptorForStreamEntity(object entity)
BaseEntityType baseEntity = entity as BaseEntityType;
if (baseEntity == null)
{
- throw Error.InvalidOperation(Strings.Context_EntityMediaLinksNotTrackedInEntity);
+ throw Error.InvalidOperation(SRResources.Context_EntityMediaLinksNotTrackedInEntity);
}
descriptor = baseEntity.EntityDescriptor;
if (descriptor == null)
{
- throw Error.InvalidOperation(Strings.Context_EntityInNonTrackedContextLacksMediaLinks);
+ throw Error.InvalidOperation(SRResources.Context_EntityInNonTrackedContextLacksMediaLinks);
}
}
else
@@ -1602,7 +1600,7 @@ public virtual void SetSaveStream(object entity, Stream stream, bool closeStream
if (clientType.MediaDataMember != null)
{
throw new ArgumentException(
- Strings.Context_SetSaveStreamOnMediaEntryProperty(clientType.ElementTypeName),
+ Error.Format(SRResources.Context_SetSaveStreamOnMediaEntryProperty, clientType.ElementTypeName),
nameof(entity));
}
@@ -1621,7 +1619,7 @@ public virtual void SetSaveStream(object entity, Stream stream, bool closeStream
break;
default:
- throw new DataServiceClientException(Strings.Context_SetSaveStreamOnInvalidEntityState(Enum.GetName(typeof(EntityStates), box.State)));
+ throw new DataServiceClientException(Error.Format(SRResources.Context_SetSaveStreamOnInvalidEntityState, Enum.GetName(typeof(EntityStates), box.State)));
}
// Note that there's no need to mark the entity as updated because we consider the presence
@@ -1667,14 +1665,14 @@ public virtual void SetSaveStream(object entity, string name, Stream stream, boo
if (string.IsNullOrEmpty(args.ContentType))
{
- throw Error.Argument(Strings.Context_ContentTypeRequiredForNamedStream, "args");
+ throw Error.Argument(SRResources.Context_ContentTypeRequiredForNamedStream, "args");
}
EntityDescriptor box = this.entityTracker.GetEntityDescriptor(entity);
Debug.Assert(box.State != EntityStates.Detached, "We should never have a detached entity in the entityDescriptor dictionary.");
if (box.State == EntityStates.Deleted)
{
- throw new DataServiceClientException(Strings.Context_SetSaveStreamOnInvalidEntityState(Enum.GetName(typeof(EntityStates), box.State)));
+ throw new DataServiceClientException(Error.Format(SRResources.Context_SetSaveStreamOnInvalidEntityState, Enum.GetName(typeof(EntityStates), box.State)));
}
StreamDescriptor namedStream = box.AddStreamInfoIfNotPresent(name);
@@ -2003,7 +2001,7 @@ public virtual OperationResponse EndExecute(IAsyncResult asyncResult)
QueryOperationResponse
public DataServiceRequestException()
- : base(Strings.DataServiceException_GeneralError)
+ : base(SRResources.DataServiceException_GeneralError)
{
}
diff --git a/src/Microsoft.OData.Client/DataServiceUrlKeyDelimiter.cs b/src/Microsoft.OData.Client/DataServiceUrlKeyDelimiter.cs
index 2790e8f7f6..01dff4060a 100644
--- a/src/Microsoft.OData.Client/DataServiceUrlKeyDelimiter.cs
+++ b/src/Microsoft.OData.Client/DataServiceUrlKeyDelimiter.cs
@@ -13,7 +13,6 @@ namespace Microsoft.OData.Client
using System.Text;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
- using ErrorStrings = Microsoft.OData.Client.Strings;
///
/// Component for controlling what convention set is used for generating URLs.
@@ -67,7 +66,7 @@ internal void AppendKeyExpression(IEdmStructuredValue entity, StringBuilder buil
IEdmEntityTypeReference edmEntityTypeReference = entity.Type as IEdmEntityTypeReference;
if (edmEntityTypeReference == null || !edmEntityTypeReference.Key().Any())
{
- throw Error.Argument(ErrorStrings.Content_EntityWithoutKey, "entity");
+ throw Error.Argument(SRResources.Content_EntityWithoutKey, "entity");
}
this.AppendKeyExpression(edmEntityTypeReference.Key().ToList(), p => p.Name, p => GetPropertyValue(entity.FindPropertyValue(p.Name), entity.Type), builder);
@@ -89,7 +88,7 @@ internal void AppendKeyExpression(ICollection keyProperties, Func(IEnumerable descriptors, bool
// Validate that we can only have one top level entity in Deep Insert.
if (bulkUpdateGraph.TopLevelDescriptors.Count > 0)
{
- throw Error.InvalidOperation(Strings.Context_DeepInsertOneTopLevelEntity);
+ throw Error.InvalidOperation(SRResources.Context_DeepInsertOneTopLevelEntity);
}
topLevelDescriptor.ContentGeneratedForSave = true;
@@ -206,7 +206,7 @@ internal void BuildDescriptorGraph(IEnumerable descriptors, bool
if (entityDescriptor.State == EntityStates.Deleted || entityDescriptor.State == EntityStates.Modified)
{
string entitySetAndKey = GetEntitySetAndKey(entityDescriptor);
- throw Error.InvalidOperation(Strings.Context_DeepInsertDeletedOrModified(entitySetAndKey));
+ throw Error.InvalidOperation(Error.Format(SRResources.Context_DeepInsertDeletedOrModified, entitySetAndKey));
}
entityDescriptor.ContentGeneratedForSave = true;
@@ -224,13 +224,13 @@ internal void BuildDescriptorGraph(IEnumerable descriptors, bool
if (linkDescriptor.State == EntityStates.Deleted || linkDescriptor.State == EntityStates.Modified)
{
string entitySetAndKey = GetEntitySetAndKey(targetDescriptor);
- throw Error.InvalidOperation(Strings.Context_DeepInsertDeletedOrModified(entitySetAndKey));
+ throw Error.InvalidOperation(Error.Format(SRResources.Context_DeepInsertDeletedOrModified, entitySetAndKey));
}
if (targetDescriptor != null && (targetDescriptor.State == EntityStates.Deleted || targetDescriptor.State == EntityStates.Modified))
{
string entitySetAndKey = GetEntitySetAndKey(targetDescriptor);
- throw Error.InvalidOperation(Strings.Context_DeepInsertDeletedOrModified(entitySetAndKey));
+ throw Error.InvalidOperation(Error.Format(SRResources.Context_DeepInsertDeletedOrModified, entitySetAndKey));
}
linkDescriptor.ContentGeneratedForSave = true;
@@ -407,7 +407,7 @@ private DataServiceResponse HandleDeepInsertResponse()
HeaderCollection headers = new HeaderCollection(this.batchResponseMessage);
int statusCode = this.batchResponseMessage == null ? (int)HttpStatusCode.InternalServerError : (int)this.batchResponseMessage.StatusCode;
DataServiceResponse dataServiceResponse = new DataServiceResponse(headers, statusCode, Enumerable.Empty(), this.IsBatchRequest);
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, ex, dataServiceResponse);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, ex, dataServiceResponse);
}
HandleDeepInsertResponseInternal(entry : entry, isTopLevelDescriptor : true, descriptor : entityDescriptor, parentOperationResponse : null);
@@ -519,7 +519,7 @@ private OperationResponse CreateOperationResponse(
if (ex != null)
{
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, ex, dataServiceResponse);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, ex, dataServiceResponse);
}
return null;
@@ -560,7 +560,7 @@ private void HandleLocationHeaders(Descriptor descriptor, HttpStatusCode statusC
// Except for preflight requests
if (headers.HasHeader("Content-Type") && statusCode != HttpStatusCode.Created)
{
- throw Error.NotSupported(Strings.Deserialize_NoLocationHeader);
+ throw Error.NotSupported(SRResources.Deserialize_NoLocationHeader);
}
}
@@ -570,7 +570,7 @@ private void HandleLocationHeaders(Descriptor descriptor, HttpStatusCode statusC
odataId = WebUtil.ValidateIdentityValue(odataEntityId);
if (location == null)
{
- throw Error.NotSupported(Strings.Context_BothLocationAndIdMustBeSpecified);
+ throw Error.NotSupported(SRResources.Context_BothLocationAndIdMustBeSpecified);
}
}
else
diff --git a/src/Microsoft.OData.Client/EntityDescriptor.cs b/src/Microsoft.OData.Client/EntityDescriptor.cs
index cab40ab9e0..7cdaf23786 100644
--- a/src/Microsoft.OData.Client/EntityDescriptor.cs
+++ b/src/Microsoft.OData.Client/EntityDescriptor.cs
@@ -926,7 +926,7 @@ private Uri GetLink(bool queryLink)
if (this.State != EntityStates.Added)
{
- throw new ArgumentNullException(Strings.EntityDescriptor_MissingSelfEditLink(this.identity));
+ throw new ArgumentNullException(Error.Format(SRResources.EntityDescriptor_MissingSelfEditLink, this.identity));
}
else
{
diff --git a/src/Microsoft.OData.Client/EntityTracker.cs b/src/Microsoft.OData.Client/EntityTracker.cs
index d4fba5d137..c0c2820880 100644
--- a/src/Microsoft.OData.Client/EntityTracker.cs
+++ b/src/Microsoft.OData.Client/EntityTracker.cs
@@ -103,7 +103,7 @@ internal override EntityDescriptor GetEntityDescriptor(object resource)
EntityDescriptor entityDescriptor = this.TryGetEntityDescriptor(resource);
if (entityDescriptor == null)
{
- throw Error.InvalidOperation(Strings.Context_EntityNotContained);
+ throw Error.InvalidOperation(SRResources.Context_EntityNotContained);
}
return entityDescriptor;
@@ -138,7 +138,7 @@ internal void AddEntityDescriptor(EntityDescriptor descriptor)
}
catch (ArgumentException)
{
- throw Error.InvalidOperation(Strings.Context_EntityAlreadyContained);
+ throw Error.InvalidOperation(SRResources.Context_EntityAlreadyContained);
}
}
@@ -238,7 +238,7 @@ internal override void AttachLink(object source, string sourceProperty, object t
break;
case MergeOption.NoTracking: // public API point should throw if link exists
- throw Error.InvalidOperation(Strings.Context_RelationAlreadyContained);
+ throw Error.InvalidOperation(SRResources.Context_RelationAlreadyContained);
}
}
else
@@ -307,7 +307,7 @@ internal void AddLink(LinkDescriptor linkDescriptor)
}
catch (ArgumentException)
{
- throw Error.InvalidOperation(Strings.Context_RelationAlreadyContained);
+ throw Error.InvalidOperation(SRResources.Context_RelationAlreadyContained);
}
}
@@ -355,7 +355,7 @@ internal override void DetachExistingLink(LinkDescriptor existingLink, bool targ
(parentOfTarget.State != EntityStates.Deleted ||
parentOfTarget.State != EntityStates.Detached))
{
- throw new InvalidOperationException(Strings.Context_ChildResourceExists);
+ throw new InvalidOperationException(SRResources.Context_ChildResourceExists);
}
}
}
@@ -465,11 +465,11 @@ internal override EntityDescriptor InternalAttachEntityDescriptor(EntityDescript
// identity existing & pointing to something else
if (failIfDuplicated && (trackedEntityDescriptor != null))
{
- throw Error.InvalidOperation(Strings.Context_EntityAlreadyContained);
+ throw Error.InvalidOperation(SRResources.Context_EntityAlreadyContained);
}
else if (trackedEntityDescriptor != existing)
{
- throw Error.InvalidOperation(Strings.Context_DifferentEntityAlreadyContained);
+ throw Error.InvalidOperation(SRResources.Context_DifferentEntityAlreadyContained);
}
else if (trackedEntityDescriptor == null)
{
@@ -549,7 +549,7 @@ private void ValidateDuplicateIdentity(Uri identity, EntityDescriptor descriptor
{
// we checked the state because we do not remove the deleted/detached entity descriptor from the dictionary until we have finished processing all changes
// So for instance if you delete one entity and add back one with the same ID, they will be a temporary conflict in the dictionary.
- throw Error.InvalidOperation(Strings.Context_DifferentEntityAlreadyContained);
+ throw Error.InvalidOperation(SRResources.Context_DifferentEntityAlreadyContained);
}
}
}
diff --git a/src/Microsoft.OData.Client/Error.cs b/src/Microsoft.OData.Client/Error.cs
index b5ed9f7ed0..2d77cef8c1 100644
--- a/src/Microsoft.OData.Client/Error.cs
+++ b/src/Microsoft.OData.Client/Error.cs
@@ -81,21 +81,21 @@ internal static InvalidOperationException HttpHeaderFailure(int errorCode, strin
/// exception to throw
internal static NotSupportedException MethodNotSupported(System.Linq.Expressions.MethodCallExpression m)
{
- return Error.NotSupported(Strings.ALinq_MethodNotSupported(m.Method.Name));
+ return Error.NotSupported(Error.Format(SRResources.ALinq_MethodNotSupported, m.Method.Name));
}
/// throw an exception because unexpected batch content was encounted
/// internal error
internal static void ThrowBatchUnexpectedContent(InternalError value)
{
- throw InvalidOperation(Strings.Batch_UnexpectedContent((int)value));
+ throw InvalidOperation(Error.Format(SRResources.Batch_UnexpectedContent, (int)value));
}
/// throw an exception because expected batch content was not encountered
/// internal error
internal static void ThrowBatchExpectedResponse(InternalError value)
{
- throw InvalidOperation(Strings.Batch_ExpectedResponse((int)value));
+ throw InvalidOperation(Error.Format(SRResources.Batch_ExpectedResponse, (int)value));
}
/// unexpected xml when reading web responses
@@ -103,7 +103,7 @@ internal static void ThrowBatchExpectedResponse(InternalError value)
/// exception to throw
internal static InvalidOperationException InternalError(InternalError value)
{
- return InvalidOperation(Strings.Context_InternalError((int)value));
+ return InvalidOperation(Error.Format(SRResources.Context_InternalError, (int)value));
}
/// throw exception for unexpected xml when reading web responses
diff --git a/src/Microsoft.OData.Client/HeaderCollection.cs b/src/Microsoft.OData.Client/HeaderCollection.cs
index 5bddfdb605..871780ae23 100644
--- a/src/Microsoft.OData.Client/HeaderCollection.cs
+++ b/src/Microsoft.OData.Client/HeaderCollection.cs
@@ -186,7 +186,7 @@ internal void SetRequestVersion(Version requestVersion, Version maxProtocolVersi
{
if (requestVersion > maxProtocolVersion)
{
- string message = Strings.Context_RequestVersionIsBiggerThanProtocolVersion(requestVersion.ToString(), maxProtocolVersion.ToString());
+ string message = Error.Format(SRResources.Context_RequestVersionIsBiggerThanProtocolVersion, requestVersion.ToString(), maxProtocolVersion.ToString());
throw Error.InvalidOperation(message);
}
diff --git a/src/Microsoft.OData.Client/LoadPropertyResult.cs b/src/Microsoft.OData.Client/LoadPropertyResult.cs
index 10291692c1..282e597738 100644
--- a/src/Microsoft.OData.Client/LoadPropertyResult.cs
+++ b/src/Microsoft.OData.Client/LoadPropertyResult.cs
@@ -70,7 +70,7 @@ internal QueryOperationResponse LoadProperty()
if (EntityStates.Added == box.State)
{
- throw Error.InvalidOperation(Strings.Context_NoLoadWithInsertEnd);
+ throw Error.InvalidOperation(SRResources.Context_NoLoadWithInsertEnd);
}
ClientPropertyAnnotation property = type.GetProperty(this.propertyName, UndeclaredPropertyBehavior.ThrowException);
@@ -94,7 +94,7 @@ internal QueryOperationResponse LoadProperty()
if (response != null)
{
response.Error = ex;
- throw new DataServiceQueryException(Strings.DataServiceException_GeneralError, ex, response);
+ throw new DataServiceQueryException(SRResources.DataServiceException_GeneralError, ex, response);
}
throw;
@@ -136,7 +136,7 @@ private static byte[] ReadByteArrayWithContentLength(Stream responseStream, int
int r = responseStream.Read(buffer, read, totalLength - read);
if (r <= 0)
{
- throw Error.InvalidOperation(Strings.Context_UnexpectedZeroRawRead);
+ throw Error.InvalidOperation(SRResources.Context_UnexpectedZeroRawRead);
}
read += r;
diff --git a/src/Microsoft.OData.Client/Materialization/CollectionValueMaterializationPolicy.cs b/src/Microsoft.OData.Client/Materialization/CollectionValueMaterializationPolicy.cs
index ccf0fd7bd0..a7ba29c8bc 100644
--- a/src/Microsoft.OData.Client/Materialization/CollectionValueMaterializationPolicy.cs
+++ b/src/Microsoft.OData.Client/Materialization/CollectionValueMaterializationPolicy.cs
@@ -84,7 +84,7 @@ internal object CreateCollectionPropertyInstance(ODataProperty collectionPropert
// get a ClientType instance for the Collection property. This determines what type will be used later when creating the actual Collection instance
ClientTypeAnnotation collectionClientType = this.materializerContext.ResolveTypeForMaterialization(userCollectionType, collectionValue.TypeName);
- return this.CreateCollectionInstance(collectionClientType.EdmTypeReference as IEdmCollectionTypeReference, collectionClientType.ElementType, () => DSClient.Strings.Materializer_NoParameterlessCtorForCollectionProperty(collectionProperty.Name, collectionClientType.ElementTypeName));
+ return this.CreateCollectionInstance(collectionClientType.EdmTypeReference as IEdmCollectionTypeReference, collectionClientType.ElementType, () => Error.Format(SRResources.Materializer_NoParameterlessCtorForCollectionProperty, collectionProperty.Name, collectionClientType.ElementTypeName));
}
///
@@ -97,7 +97,7 @@ internal object CreateCollectionInstance(IEdmCollectionTypeReference edmCollecti
{
Debug.Assert(edmCollectionTypeReference != null, "edmCollectionTypeReference!=null");
Debug.Assert(clientCollectionType != null, "clientCollectionType!=null");
- return CreateCollectionInstance(edmCollectionTypeReference, clientCollectionType, () => DSClient.Strings.Materializer_MaterializationTypeError(clientCollectionType.FullName));
+ return CreateCollectionInstance(edmCollectionTypeReference, clientCollectionType, () => Error.Format(SRResources.Materializer_MaterializationTypeError, clientCollectionType.FullName));
}
///
@@ -171,7 +171,7 @@ internal void ApplyCollectionDataValues(
{
if (!isElementNullable && item == null)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Collection_NullCollectionItemsNotSupported);
+ throw DSClient.Error.InvalidOperation(SRResources.Collection_NullCollectionItemsNotSupported);
}
ODataEnumValue enumVal = null;
@@ -181,7 +181,7 @@ internal void ApplyCollectionDataValues(
{
if (item is ODataCollectionValue)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed);
+ throw DSClient.Error.InvalidOperation(SRResources.Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed);
}
object materializedValue = this.primitiveValueMaterializationPolicy.MaterializePrimitiveDataValueCollectionElement(collectionItemType, wireTypeName, item);
@@ -198,7 +198,7 @@ internal void ApplyCollectionDataValues(
{
if (item != null)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed);
+ throw DSClient.Error.InvalidOperation(SRResources.Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed);
}
addValueToBackingICollectionInstance(collectionInstance, null);
@@ -225,7 +225,7 @@ private object CreateCollectionInstance(IEdmCollectionTypeReference edmCollectio
// DataServiceCollection cannot track non-entity types so it should not be used for storing primitive or complex types
if (ClientTypeUtil.IsDataServiceCollection(clientCollectionType))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Materializer_DataServiceCollectionNotSupportedForNonEntities);
+ throw DSClient.Error.InvalidOperation(SRResources.Materializer_DataServiceCollectionNotSupportedForNonEntities);
}
try
diff --git a/src/Microsoft.OData.Client/Materialization/EntityTrackingAdapter.cs b/src/Microsoft.OData.Client/Materialization/EntityTrackingAdapter.cs
index 2a12fde7e7..46b1f461b1 100644
--- a/src/Microsoft.OData.Client/Materialization/EntityTrackingAdapter.cs
+++ b/src/Microsoft.OData.Client/Materialization/EntityTrackingAdapter.cs
@@ -131,7 +131,7 @@ internal bool TryResolveAsExistingEntry(MaterializerEntry entry, Type expectedEn
// The resolver methods below will both need access to Id, so first ensure it's not null
if (entry.Id == null)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MissingIdElement);
+ throw DSClient.Error.InvalidOperation(SRResources.Deserialize_MissingIdElement);
}
return this.TryResolveAsCreated(entry) || this.TryResolveFromContext(entry, expectedEntryType);
@@ -184,7 +184,7 @@ private bool TryResolveFromContext(MaterializerEntry entry, Type expectedEntryTy
{
if (!expectedEntryType.IsInstanceOfType(entry.ResolvedObject))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_Current(expectedEntryType, entry.ResolvedObject.GetType()));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Deserialize_Current, expectedEntryType, entry.ResolvedObject.GetType()));
}
ClientEdmModel edmModel = this.Model;
diff --git a/src/Microsoft.OData.Client/Materialization/EntryValueMaterializationPolicy.cs b/src/Microsoft.OData.Client/Materialization/EntryValueMaterializationPolicy.cs
index 15f5549b92..a2fa1dc0d1 100644
--- a/src/Microsoft.OData.Client/Materialization/EntryValueMaterializationPolicy.cs
+++ b/src/Microsoft.OData.Client/Materialization/EntryValueMaterializationPolicy.cs
@@ -94,7 +94,7 @@ internal static Type ValidatePropertyMatch(ClientPropertyAnnotation property, OD
// and in the client, the property is not a collection property.
if (!property.IsResourceSet)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MismatchEntryLinkFeedPropertyNotCollection(property.PropertyName));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Deserialize_MismatchEntryLinkFeedPropertyNotCollection, property.PropertyName));
}
propertyType = property.ResourceSetItemType;
@@ -103,7 +103,7 @@ internal static Type ValidatePropertyMatch(ClientPropertyAnnotation property, OD
{
if (property.IsResourceSet)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MismatchEntryLinkEntryPropertyIsCollection(property.PropertyName));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Deserialize_MismatchEntryLinkEntryPropertyIsCollection, property.PropertyName));
}
propertyType = property.PropertyType;
@@ -116,7 +116,7 @@ internal static Type ValidatePropertyMatch(ClientPropertyAnnotation property, OD
{
if (!ClientTypeUtil.TypeIsStructured(propertyType, model))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Materializer_InvalidNonEntityType(propertyType.ToString()));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Materializer_InvalidNonEntityType, propertyType.ToString()));
}
}
@@ -141,7 +141,7 @@ internal static void ValidatePropertyMatch(ClientPropertyAnnotation property, OD
if (property.IsKnownType && (feed != null || entry != null))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MismatchEntryLinkLocalSimple);
+ throw DSClient.Error.InvalidOperation(SRResources.Deserialize_MismatchEntryLinkLocalSimple);
}
Type propertyType = null;
@@ -151,7 +151,7 @@ internal static void ValidatePropertyMatch(ClientPropertyAnnotation property, OD
// and in the client, the property is not a collection property.
if (!property.IsEntityCollection)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MismatchEntryLinkFeedPropertyNotCollection(property.PropertyName));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Deserialize_MismatchEntryLinkFeedPropertyNotCollection, property.PropertyName));
}
propertyType = property.EntityCollectionItemType;
@@ -161,7 +161,7 @@ internal static void ValidatePropertyMatch(ClientPropertyAnnotation property, OD
{
if (property.IsEntityCollection)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MismatchEntryLinkEntryPropertyIsCollection(property.PropertyName));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Deserialize_MismatchEntryLinkEntryPropertyIsCollection, property.PropertyName));
}
propertyType = property.PropertyType;
@@ -173,7 +173,7 @@ internal static void ValidatePropertyMatch(ClientPropertyAnnotation property, OD
{
if (!ClientTypeUtil.TypeIsEntity(propertyType, model))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Materializer_InvalidNonEntityType(propertyType.ToString()));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Materializer_InvalidNonEntityType, propertyType.ToString()));
}
}
}
@@ -351,7 +351,7 @@ private static void ValidateCollectionElementTypeIsItemType(Type itemType, Type
{
if (!collectionElementType.IsAssignableFrom(itemType))
{
- string message = DSClient.Strings.Materializer_EntryIntoCollectionMismatch(
+ string message = Error.Format(SRResources.Materializer_EntryIntoCollectionMismatch,
itemType.FullName,
collectionElementType.FullName);
@@ -569,7 +569,7 @@ private void MaterializeResolvedEntry(MaterializerEntry entry, bool includeLinks
// This is a breaking change from V1/V2 where we allowed materialization of entities into non-entities and vice versa
if (!actualType.IsStructuredType)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Materializer_InvalidNonEntityType(actualType.ElementTypeName));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Materializer_InvalidNonEntityType, actualType.ElementTypeName));
}
// Note that even if ShouldUpdateFromPayload is false, we will still be creating
diff --git a/src/Microsoft.OData.Client/Materialization/EnumValueMaterializationPolicy.cs b/src/Microsoft.OData.Client/Materialization/EnumValueMaterializationPolicy.cs
index a0c6562685..0c4261b9db 100644
--- a/src/Microsoft.OData.Client/Materialization/EnumValueMaterializationPolicy.cs
+++ b/src/Microsoft.OData.Client/Materialization/EnumValueMaterializationPolicy.cs
@@ -58,7 +58,7 @@ public object MaterializeEnumTypeProperty(Type valueType, ODataProperty property
public object MaterializeEnumDataValueCollectionElement(Type collectionItemType, string wireTypeName, string item)
{
object materializedValue = null;
- this.MaterializeODataEnumValue(collectionItemType, wireTypeName, item, () => DSClient.Strings.Collection_NullCollectionItemsNotSupported, out materializedValue);
+ this.MaterializeODataEnumValue(collectionItemType, wireTypeName, item, () => SRResources.Collection_NullCollectionItemsNotSupported, out materializedValue);
return materializedValue;
}
diff --git a/src/Microsoft.OData.Client/Materialization/FeedAndEntryMaterializerAdapter.cs b/src/Microsoft.OData.Client/Materialization/FeedAndEntryMaterializerAdapter.cs
index f31fc6f475..88cd4c7966 100644
--- a/src/Microsoft.OData.Client/Materialization/FeedAndEntryMaterializerAdapter.cs
+++ b/src/Microsoft.OData.Client/Materialization/FeedAndEntryMaterializerAdapter.cs
@@ -149,7 +149,7 @@ public long GetCountValue(bool readIfNoFeed)
return this.currentFeed.Count.Value;
}
- throw new InvalidOperationException(DSClient.Strings.MaterializeFromObject_CountNotPresent);
+ throw new InvalidOperationException(SRResources.MaterializeFromObject_CountNotPresent);
}
///
@@ -652,7 +652,7 @@ private bool TryRead()
}
catch (ODataErrorException e)
{
- throw new DataServiceClientException(DSClient.Strings.Deserialize_ServerException(e.Error.Message), e);
+ throw new DataServiceClientException(Error.Format(SRResources.Deserialize_ServerException, e.Error.Message), e);
}
catch (ODataException o)
{
diff --git a/src/Microsoft.OData.Client/Materialization/ODataCollectionMaterializer.cs b/src/Microsoft.OData.Client/Materialization/ODataCollectionMaterializer.cs
index e0ff0fc4c0..21adf0cedd 100644
--- a/src/Microsoft.OData.Client/Materialization/ODataCollectionMaterializer.cs
+++ b/src/Microsoft.OData.Client/Materialization/ODataCollectionMaterializer.cs
@@ -53,7 +53,7 @@ protected override void ReadWithExpectedType(IEdmTypeReference expectedClientTyp
{
if (!expectedClientType.IsCollection())
{
- throw new DataServiceClientException(DSClient.Strings.Materializer_TypeShouldBeCollectionError(expectedClientType.FullName()));
+ throw new DataServiceClientException(Error.Format(SRResources.Materializer_TypeShouldBeCollectionError, expectedClientType.FullName()));
}
Type underlyingExpectedType = Nullable.GetUnderlyingType(this.ExpectedType) ?? this.ExpectedType;
@@ -162,7 +162,7 @@ public bool MoveNext()
/// The collection was modified after the enumerator was created.
public void Reset()
{
- throw new InvalidOperationException(DSClient.Strings.Materializer_ResetAfterEnumeratorCreationError);
+ throw new InvalidOperationException(SRResources.Materializer_ResetAfterEnumeratorCreationError);
}
}
}
diff --git a/src/Microsoft.OData.Client/Materialization/ODataEntityMaterializer.cs b/src/Microsoft.OData.Client/Materialization/ODataEntityMaterializer.cs
index 4ef2dc575c..a9db133ecc 100644
--- a/src/Microsoft.OData.Client/Materialization/ODataEntityMaterializer.cs
+++ b/src/Microsoft.OData.Client/Materialization/ODataEntityMaterializer.cs
@@ -402,7 +402,7 @@ internal static ODataResource ProjectionGetEntry(MaterializerEntry entry, string
if (result == null)
{
- throw new InvalidOperationException(DSClient.Strings.Materializer_PropertyNotExpectedEntry(name));
+ throw new InvalidOperationException(Error.Format(SRResources.Materializer_PropertyNotExpectedEntry, name));
}
if (!materializerContext.AutoNullPropagation)
@@ -437,7 +437,7 @@ internal static object ProjectionInitializeEntity(
if (entry.Entry == null)
{
- throw new NullReferenceException(DSClient.Strings.Materializer_EntryToInitializeIsNull(resultType.FullName));
+ throw new NullReferenceException(Error.Format(SRResources.Materializer_EntryToInitializeIsNull, resultType.FullName));
}
if (!entry.EntityHasBeenResolved)
@@ -446,7 +446,7 @@ internal static object ProjectionInitializeEntity(
}
else if (!resultType.IsAssignableFrom(entry.ActualType.ElementType))
{
- string message = DSClient.Strings.Materializer_ProjectEntityTypeMismatch(
+ string message = Error.Format(SRResources.Materializer_ProjectEntityTypeMismatch,
resultType.FullName,
entry.ActualType.ElementType.FullName,
entry.Id);
@@ -558,7 +558,7 @@ internal static void ProjectionEnsureEntryAvailableOfType(ODataEntityMaterialize
{
if (!requiredType.IsAssignableFrom(entry.ResolvedObject.GetType()))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_Current(requiredType, entry.ResolvedObject.GetType()));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Deserialize_Current, requiredType, entry.ResolvedObject.GetType()));
}
}
}
@@ -652,7 +652,7 @@ internal object ProjectionValueForPath(MaterializerEntry entry, Type expectedTyp
else
{
// the named stream projected did not come back as part of the property
- throw new InvalidOperationException(DSClient.Strings.Materializer_PropertyMissing(propertyName));
+ throw new InvalidOperationException(Error.Format(SRResources.Materializer_PropertyMissing, propertyName));
}
}
@@ -674,7 +674,7 @@ internal object ProjectionValueForPath(MaterializerEntry entry, Type expectedTyp
link = odataProperty == null && links != null ? links.Where(p => p.Name == propertyName).FirstOrDefault() : null;
if (link == null && odataProperty == null)
{
- throw new InvalidOperationException(DSClient.Strings.Materializer_PropertyMissing(propertyName));
+ throw new InvalidOperationException(Error.Format(SRResources.Materializer_PropertyMissing, propertyName));
}
if (link != null)
@@ -775,7 +775,7 @@ internal object ProjectionValueForPath(MaterializerEntry entry, Type expectedTyp
// This is a breaking change from V1/V2 where we allowed materialization of entities into non-entities and vice versa
if (ClientTypeUtil.TypeOrElementTypeIsEntity(property.PropertyType))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Materializer_InvalidEntityType(property.EntityCollectionItemType ?? property.PropertyType));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Materializer_InvalidEntityType, property.EntityCollectionItemType ?? property.PropertyType));
}
if (property.IsPrimitiveOrEnumOrComplexCollection)
@@ -796,7 +796,7 @@ internal object ProjectionValueForPath(MaterializerEntry entry, Type expectedTyp
{
if (odataProperty.Value == null && !ClientTypeUtil.CanAssignNull(property.NullablePropertyType))
{
- throw new InvalidOperationException(DSClient.Strings.Materializer_CannotAssignNull(odataProperty.Name, property.NullablePropertyType));
+ throw new InvalidOperationException(Error.Format(SRResources.Materializer_CannotAssignNull, odataProperty.Name, property.NullablePropertyType));
}
this.entryValueMaterializationPolicy.MaterializePrimitiveDataValue(property.NullablePropertyType, odataProperty);
@@ -856,12 +856,12 @@ internal object ProjectionDynamicValueForPath(MaterializerEntry entry, Type expe
if (odataProperty == null)
{
- throw new InvalidOperationException(DSClient.Strings.Materializer_PropertyMissing(propertyName));
+ throw new InvalidOperationException(Error.Format(SRResources.Materializer_PropertyMissing, propertyName));
}
if (odataProperty.Value == null && !ClientTypeUtil.CanAssignNull(expectedPropertyType))
{
- throw new InvalidOperationException(DSClient.Strings.Materializer_CannotAssignNull(odataProperty.Name, expectedPropertyType));
+ throw new InvalidOperationException(Error.Format(SRResources.Materializer_CannotAssignNull, odataProperty.Name, expectedPropertyType));
}
this.entryValueMaterializationPolicy.MaterializePrimitiveDataValue(expectedPropertyType, odataProperty);
@@ -970,7 +970,7 @@ private static void CheckEntryToAccessNotNull(MaterializerEntry entry, string na
if (entry.Entry == null)
{
- throw new NullReferenceException(DSClient.Strings.Materializer_EntryToAccessIsNull(name));
+ throw new NullReferenceException(Error.Format(SRResources.Materializer_EntryToAccessIsNull, name));
}
}
@@ -1050,7 +1050,7 @@ private static MaterializerNestedEntry GetPropertyOrThrow(IEnumerable
/// Used to materialize a value from an .
@@ -80,7 +79,7 @@ internal sealed override bool IsEndOfStream
/// The count value returned from the server
internal override long CountValue
{
- get { throw new InvalidOperationException(ClientStrings.MaterializeFromObject_CountNotPresent); }
+ get { throw new InvalidOperationException(SRResources.MaterializeFromObject_CountNotPresent); }
}
///
@@ -148,7 +147,7 @@ protected sealed override bool ReadImplementation()
}
catch (ODataErrorException e)
{
- throw new DataServiceClientException(ClientStrings.Deserialize_ServerException(e.Error.Message), e);
+ throw new DataServiceClientException(Error.Format(SRResources.Deserialize_ServerException, e.Error.Message), e);
}
catch (ODataException e)
{
diff --git a/src/Microsoft.OData.Client/Materialization/ODataReaderEntityMaterializer.cs b/src/Microsoft.OData.Client/Materialization/ODataReaderEntityMaterializer.cs
index cb79b43ee0..1187a61975 100644
--- a/src/Microsoft.OData.Client/Materialization/ODataReaderEntityMaterializer.cs
+++ b/src/Microsoft.OData.Client/Materialization/ODataReaderEntityMaterializer.cs
@@ -145,7 +145,7 @@ internal static MaterializerEntry ParseSingleEntityPayload(IODataResponseMessage
{
if (entry != null)
{
- throw new InvalidOperationException(DSClient.Strings.Parser_SingleEntry_MultipleFound);
+ throw new InvalidOperationException(SRResources.Parser_SingleEntry_MultipleFound);
}
entry = parser.CurrentEntry;
@@ -156,11 +156,11 @@ internal static MaterializerEntry ParseSingleEntityPayload(IODataResponseMessage
{
if (readFeed)
{
- throw new InvalidOperationException(DSClient.Strings.Parser_SingleEntry_NoneFound);
+ throw new InvalidOperationException(SRResources.Parser_SingleEntry_NoneFound);
}
else
{
- throw new InvalidOperationException(DSClient.Strings.Parser_SingleEntry_ExpectedFeedOrEntry);
+ throw new InvalidOperationException(SRResources.Parser_SingleEntry_ExpectedFeedOrEntry);
}
}
@@ -204,11 +204,11 @@ internal static MaterializerDeltaFeed ParseDeltaResourceSetPayload(IODataRespons
{
if (readDeltaResourceSet)
{
- throw new InvalidOperationException(DSClient.Strings.Parser_SingleEntry_NoneFound);
+ throw new InvalidOperationException(SRResources.Parser_SingleEntry_NoneFound);
}
else
{
- throw new InvalidOperationException(DSClient.Strings.Parser_SingleEntry_ExpectedFeedOrEntry);
+ throw new InvalidOperationException(SRResources.Parser_SingleEntry_ExpectedFeedOrEntry);
}
}
diff --git a/src/Microsoft.OData.Client/Materialization/PrimitivePropertyConverter.cs b/src/Microsoft.OData.Client/Materialization/PrimitivePropertyConverter.cs
index ff1408b66f..203d338013 100644
--- a/src/Microsoft.OData.Client/Materialization/PrimitivePropertyConverter.cs
+++ b/src/Microsoft.OData.Client/Materialization/PrimitivePropertyConverter.cs
@@ -38,7 +38,7 @@ internal object ConvertPrimitiveValue(object value, Type propertyType)
{
if (!PrimitiveType.IsKnownNullableType(propertyType))
{
- throw new InvalidOperationException(Client.Strings.ClientType_UnsupportedType(propertyType));
+ throw new InvalidOperationException(Error.Format(SRResources.ClientType_UnsupportedType, propertyType));
}
// Fast path for the supported primitive types that have a type code and are supported by ODataLib.
diff --git a/src/Microsoft.OData.Client/Materialization/PrimitiveValueMaterializationPolicy.cs b/src/Microsoft.OData.Client/Materialization/PrimitiveValueMaterializationPolicy.cs
index 707452cca0..af6e7cd7d5 100644
--- a/src/Microsoft.OData.Client/Materialization/PrimitiveValueMaterializationPolicy.cs
+++ b/src/Microsoft.OData.Client/Materialization/PrimitiveValueMaterializationPolicy.cs
@@ -70,7 +70,7 @@ public object MaterializePrimitiveDataValue(Type collectionItemType, string wire
public object MaterializePrimitiveDataValueCollectionElement(Type collectionItemType, string wireTypeName, object item)
{
object materializedValue = null;
- this.MaterializePrimitiveDataValue(collectionItemType, wireTypeName, item, () => DSClient.Strings.Collection_NullCollectionItemsNotSupported, out materializedValue);
+ this.MaterializePrimitiveDataValue(collectionItemType, wireTypeName, item, () => SRResources.Collection_NullCollectionItemsNotSupported, out materializedValue);
return materializedValue;
}
diff --git a/src/Microsoft.OData.Client/Materialization/StructuralValueMaterializationPolicy.cs b/src/Microsoft.OData.Client/Materialization/StructuralValueMaterializationPolicy.cs
index f40d086a73..79572fa015 100644
--- a/src/Microsoft.OData.Client/Materialization/StructuralValueMaterializationPolicy.cs
+++ b/src/Microsoft.OData.Client/Materialization/StructuralValueMaterializationPolicy.cs
@@ -169,13 +169,13 @@ internal void ApplyDataValue(ClientTypeAnnotation type, ODataProperty property,
// Collections must not be null
if (property.Value == null)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Collection_NullCollectionNotSupported(property.Name));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Collection_NullCollectionNotSupported, property.Name));
}
// This happens if the payload contain just primitive value for a Collection property
if (property.Value is string)
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Deserialize_MixedTextWithComment);
+ throw DSClient.Error.InvalidOperation(SRResources.Deserialize_MixedTextWithComment);
}
// ODataLib already parsed the data and materialized all the primitive types. There is nothing more to materialize
@@ -265,7 +265,7 @@ internal void MaterializeDataValues(ClientTypeAnnotation actualType, IEnumerable
// This is a breaking change from V1/V2 where we allowed materialization of entities into non-entities and vice versa
if (ClientTypeUtil.TypeOrElementTypeIsEntity(property.PropertyType))
{
- throw DSClient.Error.InvalidOperation(DSClient.Strings.Materializer_InvalidEntityType(property.EntityCollectionItemType ?? property.PropertyType));
+ throw DSClient.Error.InvalidOperation(Error.Format(SRResources.Materializer_InvalidEntityType, property.EntityCollectionItemType ?? property.PropertyType));
}
if (property.IsKnownType)
diff --git a/src/Microsoft.OData.Client/MemberAssignmentAnalysis.cs b/src/Microsoft.OData.Client/MemberAssignmentAnalysis.cs
index 57c238dd55..0bc2e3f3db 100644
--- a/src/Microsoft.OData.Client/MemberAssignmentAnalysis.cs
+++ b/src/Microsoft.OData.Client/MemberAssignmentAnalysis.cs
@@ -370,7 +370,7 @@ private static Exception CheckCompatibleAssignmentsFail(Type targetType, Express
Debug.Assert(previous != null, "previous != null");
Debug.Assert(candidate != null, "candidate != null");
- string message = Strings.ALinq_ProjectionMemberAssignmentMismatch(targetType.FullName, previous.LastOrDefault(), candidate.LastOrDefault());
+ string message = Error.Format(SRResources.ALinq_ProjectionMemberAssignmentMismatch, targetType.FullName, previous.LastOrDefault(), candidate.LastOrDefault());
return new NotSupportedException(message);
}
diff --git a/src/Microsoft.OData.Client/Metadata/ClientPropertyAnnotation.cs b/src/Microsoft.OData.Client/Metadata/ClientPropertyAnnotation.cs
index 2d15a8a515..72636669a9 100644
--- a/src/Microsoft.OData.Client/Metadata/ClientPropertyAnnotation.cs
+++ b/src/Microsoft.OData.Client/Metadata/ClientPropertyAnnotation.cs
@@ -443,7 +443,7 @@ internal void SetValue(object instance, object value, string propertyName, bool
}
else
{
- throw OData.Client.Error.InvalidOperation(OData.Client.Strings.ClientType_MissingProperty(value.GetType().ToString(), propertyName));
+ throw Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingProperty, value.GetType().ToString(), propertyName));
}
}
diff --git a/src/Microsoft.OData.Client/Metadata/ClientTypeAnnotation.cs b/src/Microsoft.OData.Client/Metadata/ClientTypeAnnotation.cs
index 007d09897e..d884f714d3 100644
--- a/src/Microsoft.OData.Client/Metadata/ClientTypeAnnotation.cs
+++ b/src/Microsoft.OData.Client/Metadata/ClientTypeAnnotation.cs
@@ -176,7 +176,7 @@ internal ClientPropertyAnnotation GetProperty(string propertyName, UndeclaredPro
string propertyClientName = ClientTypeUtil.GetClientPropertyName(this.ElementType, propertyName, undeclaredPropertyBehavior);
if ((string.IsNullOrEmpty(propertyClientName) || !this.clientPropertyCache.TryGetValue(propertyClientName, out property)) && (undeclaredPropertyBehavior == UndeclaredPropertyBehavior.ThrowException))
{
- throw Microsoft.OData.Client.Error.InvalidOperation(Microsoft.OData.Client.Strings.ClientType_MissingProperty(this.ElementTypeName, propertyName));
+ throw Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingProperty, this.ElementTypeName, propertyName));
}
}
@@ -256,7 +256,7 @@ private void CheckMediaLinkEntry()
ClientPropertyAnnotation mediaProperty = this.Properties().SingleOrDefault(p => p.PropertyName == mediaEntryAttribute.MediaMemberName);
if (mediaProperty == null)
{
- throw Microsoft.OData.Client.Error.InvalidOperation(Microsoft.OData.Client.Strings.ClientType_MissingMediaEntryProperty(
+ throw Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingMediaEntryProperty,
this.ElementTypeName, mediaEntryAttribute.MediaMemberName));
}
diff --git a/src/Microsoft.OData.Client/Metadata/ClientTypeCache.cs b/src/Microsoft.OData.Client/Metadata/ClientTypeCache.cs
index acbaeed63e..b431c9cc08 100644
--- a/src/Microsoft.OData.Client/Metadata/ClientTypeCache.cs
+++ b/src/Microsoft.OData.Client/Metadata/ClientTypeCache.cs
@@ -120,7 +120,7 @@ private static void ResolveSubclass(string wireClassName, Type userType, Type ty
{
if (existing != null)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_Ambiguous(wireClassName, userType));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_Ambiguous, wireClassName, userType));
}
existing = type;
diff --git a/src/Microsoft.OData.Client/Metadata/ClientTypeUtil.cs b/src/Microsoft.OData.Client/Metadata/ClientTypeUtil.cs
index 768b650d9c..7ac9102dc2 100644
--- a/src/Microsoft.OData.Client/Metadata/ClientTypeUtil.cs
+++ b/src/Microsoft.OData.Client/Metadata/ClientTypeUtil.cs
@@ -264,7 +264,7 @@ internal static Type GetImplementationType(Type type, Type genericTypeDefinition
}
else
{ // Multiple implementations (e.g. ICollection and ICollection)
- throw Client.Error.NotSupported(Client.Strings.ClientType_MultipleImplementationNotSupported);
+ throw Client.Error.NotSupported(SRResources.ClientType_MultipleImplementationNotSupported);
}
}
}
@@ -561,7 +561,7 @@ internal static string GetEnumValuesString(string enumString, Type enumType)
MemberInfo member = enumType.GetField(enumValue);
if (member == null)
{
- throw new NotSupportedException(Strings.Serializer_InvalidEnumMemberValue(enumType.Name, enumValue));
+ throw new NotSupportedException(Error.Format(SRResources.Serializer_InvalidEnumMemberValue, enumType.Name, enumValue));
}
memberValues.Add(ClientTypeUtil.GetServerDefinedName(member));
diff --git a/src/Microsoft.OData.Client/Metadata/ODataTypeInfo.cs b/src/Microsoft.OData.Client/Metadata/ODataTypeInfo.cs
index 9f6ef0ea87..599b3bea20 100644
--- a/src/Microsoft.OData.Client/Metadata/ODataTypeInfo.cs
+++ b/src/Microsoft.OData.Client/Metadata/ODataTypeInfo.cs
@@ -170,7 +170,7 @@ public string GetClientFieldName(string serverSideName)
if (memberInfo == null)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_MissingProperty(type.ToString(), serverSideName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingProperty, type.ToString(), serverSideName));
}
memberInfoName = memberInfo.Name;
@@ -197,7 +197,7 @@ public PropertyInfo GetClientPropertyInfo(string serverDefinedName, UndeclaredPr
if ((!_propertyInfoDict.TryGetValue(serverDefinedName, out clientPropertyInfo)) && undeclaredPropertyBehavior == UndeclaredPropertyBehavior.ThrowException)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_MissingProperty(type.ToString(), serverDefinedName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingProperty, type.ToString(), serverDefinedName));
}
return clientPropertyInfo;
@@ -274,7 +274,7 @@ private PropertyInfo[] GetKeyProperties()
{
if (CommonUtil.IsUnsupportedType(type))
{
- throw new InvalidOperationException(Client.Strings.ClientType_UnsupportedType(type));
+ throw new InvalidOperationException(Error.Format(SRResources.ClientType_UnsupportedType, type));
}
string typeName = type.ToString();
@@ -318,14 +318,14 @@ private PropertyInfo[] GetKeyProperties()
}
else if (keyPropertyDeclaringType != key.DeclaringType)
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_KeysOnDifferentDeclaredType(typeName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_KeysOnDifferentDeclaredType, typeName));
}
// Check if the key property's type is a known primitive, an enum, or a nullable generic.
// If it doesn't meet any of these conditions, throw an InvalidOperationException.
if (!PrimitiveType.IsKnownType(key.PropertyType) && !key.PropertyType.IsEnum() && !(key.PropertyType.IsGenericType() && key.PropertyType.GetGenericTypeDefinition() == typeof(System.Nullable<>) && key.PropertyType.GetGenericArguments().First().IsEnum()))
{
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_KeysMustBeSimpleTypes(key.Name, typeName, key.PropertyType.FullName));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_KeysMustBeSimpleTypes, key.Name, typeName, key.PropertyType.FullName));
}
}
@@ -338,7 +338,7 @@ private PropertyInfo[] GetKeyProperties()
where b.Name == a
select b).FirstOrDefault() == null
select a).First();
- throw Client.Error.InvalidOperation(Client.Strings.ClientType_MissingProperty(typeName, m));
+ throw Client.Error.InvalidOperation(Error.Format(SRResources.ClientType_MissingProperty, typeName, m));
}
}
diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.Common.txt b/src/Microsoft.OData.Client/Microsoft.OData.Client.Common.txt
deleted file mode 100644
index f4eef17c48..0000000000
--- a/src/Microsoft.OData.Client/Microsoft.OData.Client.Common.txt
+++ /dev/null
@@ -1,303 +0,0 @@
-
-; NOTE: don't use \", use ' instead
-; NOTE: don't use #, use ; instead for comments
-; NOTE: leave the [strings] alone
-
-; See ResourceManager documentation and the ResGen tool.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error Messages
-
-Batch_ExpectedContentType=The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "{0}".
-Batch_ExpectedResponse=The POST request expected a response with content. ID={0}
-Batch_IncompleteResponseCount=Not all requests in the batch had a response.
-Batch_UnexpectedContent=The web response contained unexpected sections. ID={0}
-
-Context_BaseUri=Expected an absolute, well formed http URL without a query or fragment.
-Context_BaseUriRequired=You must set the BaseUri property before you perform this operation.
-Context_ResolveReturnedInvalidUri=The Uri that is returned by the ResolveEntitySet function must be an absolute, well-formed URL with an "http" or "https" scheme name and without any query strings or fragment identifiers.
-Context_RequestUriIsRelativeBaseUriRequired=Because the requestUri is a relative Uri, you must set the BaseUri property on the DataServiceContext.
-Context_ResolveEntitySetOrBaseUriRequired=The ResolveEntitySet function must return a non-null Uri for the EntitySet '{0}', otherwise you must set the BaseUri property.
-Context_CannotConvertKey=Unable to convert value '{0}' into a key string for a URI.
-Context_TrackingExpectsAbsoluteUri=The identity value specified by either the entry id element or OData-EntityId header must be an absolute URI.
-Context_LocationHeaderExpectsAbsoluteUri=The 'Location' header value specified in the response must be an absolute URI.
-Context_LinkResourceInsertFailure=One of the link's resources failed to insert.
-Context_InternalError=Microsoft.OData.Client internal error {0}.
-Context_BatchExecuteError=An error occurred for this query during batch execution. See the inner exception for details.
-Context_EntitySetName=Expected a relative URL path without query or fragment.
-Context_BatchNotSupportedForNamedStreams=Changes cannot be saved as a batch when an entity has one or more streams associated with it. Retry the SaveChanges operation without enabling the SaveChangesOptions.BatchWithSingleChangeset and the SaveChangesOptions.BatchWithIndependentOperations options.
-Context_SetSaveStreamWithoutNamedStreamEditLink=The stream named '{0}' cannot be modified because it does not have an edit-media link. Make sure that the stream name is correct and that an edit-media link for this stream is included in the entry element in the response.
-Content_EntityWithoutKey=This operation requires the entity be of an Entity Type, and has at least one key property.
-Content_EntityIsNotEntityType=This operation requires the entity to be of an Entity Type, either mark its key properties, or attribute the class with DataServiceEntityAttribute
-Context_EntityNotContained=The context is not currently tracking the entity.
-Context_EntityAlreadyContained=The context is already tracking the entity.
-Context_DifferentEntityAlreadyContained=The context is already tracking a different entity with the same resource Uri.
-Context_DidNotOriginateAsync=The current object did not originate the async result.
-Context_AsyncAlreadyDone=The asynchronous result has already been completed.
-Context_OperationCanceled=The operation has been canceled.
-Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX=The property '{0}' is not supported when MaxProtocolVersion is greater than '{1}'.
-
-Context_NoLoadWithInsertEnd=The context can not load the related collection or reference for objects in the added state.
-Context_NoRelationWithInsertEnd=One or both of the ends of the relationship is in the added state.
-Context_NoRelationWithDeleteEnd=One or both of the ends of the relationship is in the deleted state.
-Context_RelationAlreadyContained=The context is already tracking the relationship.
-Context_RelationNotRefOrCollection=The sourceProperty is not a reference or collection of the target's object type.
-Context_AddLinkCollectionOnly=AddLink and DeleteLink methods only work when the sourceProperty is a collection.
-Context_AddRelatedObjectCollectionOnly=AddRelatedObject method only works when the sourceProperty is a collection.
-Context_AddRelatedObjectSourceDeleted=AddRelatedObject method only works if the source entity is in a non-deleted state.
-Context_UpdateRelatedObjectNonCollectionOnly=UpdateRelatedObject method only works when the sourceProperty is not collection.
-Context_SetLinkReferenceOnly=SetLink method only works when the sourceProperty is not a collection.
-Context_SetRelatedObjectNonCollectionOnly=SetRelatedObject method only works when the sourceProperty is not a collection.
-Context_SetRelatedObjectSourceDeleted=SetRelatedObject method only works if the source entity is in a non-deleted state.
-Context_SetRelatedObjectLinkNonCollectionOnly=SetRelatedObjectLink method only works when the sourceProperty is not a collection.
-Context_SetRelatedObjectLinkSourceDeleted=SetRelatedObjectLink method only works if the source entity is in a non-deleted state.
-
-Context_NoContentTypeForMediaLink=Media link object of type '{0}' is configured to use the MIME type specified in the property '{1}'. However, that property's value is null or empty.
-Context_BatchNotSupportedForMediaLink=Saving entities with the [MediaEntry] attribute is not currently supported in batch mode. Use non-batched mode instead.
-Context_UnexpectedZeroRawRead=Unexpected result (<= 0) from stream.Read() while reading raw data for this property.
-Context_VersionNotSupported=Response version '{0}' is not supported. The only supported versions are: {1}.
-Context_ResponseVersionIsBiggerThanProtocolVersion=The response version is {0}, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the version required by the response, and then retry the request. If the client does not support the required protocol version, then upgrade the client.
-Context_RequestVersionIsBiggerThanProtocolVersion=The request requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the higher version, and then retry the operation.
-
-Context_ChildResourceExists=Attempt to delete a link between two objects failed because the identity of the target object of the link depends on the source object of the link.
-
-Context_ContentTypeRequiredForNamedStream=The ContentType value for a named stream cannot be null or an empty string.
-Context_EntityNotMediaLinkEntry=This operation requires that the specified entity be a Media Link Entry and that the ReadStreamUri be available. However, the specified entity either is not a Media Link Entry or does not have a valid ReadStreamUri value. If the entity is a Media Link Entry, re-query the data service for this entity to obtain a valid ReadStreamUri value.
-Context_MLEWithoutSaveStream=The entity type {0} is marked with MediaEntry attribute but no save stream was set for the entity.
-Context_SetSaveStreamOnMediaEntryProperty=Can't use SetSaveStream on entity with type {0} which has a media entry property defined.
-Context_SetSaveStreamWithoutEditMediaLink=There is no edit-media link for the entity's media stream. Make sure that the edit-media link is specified for this stream.
-Context_SetSaveStreamOnInvalidEntityState=Calling SetSaveStream on an entity with state '{0}' is not allowed.
-Context_EntityDoesNotContainNamedStream=The entity does not have a stream named '{0}'. Make sure that the name of the stream is correct.
-Context_MissingSelfAndEditLinkForNamedStream=There is no self-link or edit-media link for the stream named '{0}'. Make sure that either the self-link or edit-media link is specified for this stream.
-Context_BothLocationAndIdMustBeSpecified=The response should have both 'Location' and 'OData-EntityId' headers or the response should not have any of these headers.
-Context_BodyOperationParametersNotAllowedWithGet=OperationParameter of type BodyOperationParameter cannot be specified when the HttpMethod is set to GET.
-Context_MissingOperationParameterName=The Name property of an OperationParameter must be set to a non-null, non-empty string.
-Context_DuplicateUriOperationParameterName=Multiple uri operation parameters were found with the same name. Uri operation parameter names must be unique.
-Context_DuplicateBodyOperationParameterName=Multiple body operation parameters were found with the same name. Body operation parameter names must be unique.
-Context_NullKeysAreNotSupported=The serialized resource has a null value in key member '{0}'. Null values are not supported in key members.
-Context_ExecuteExpectsGetOrPostOrDelete=The HttpMethod must be GET, POST or DELETE.
-Context_EndExecuteExpectedVoidResponse=EndExecute overload for void service operations and actions received a non-void response from the server.
-Context_NullElementInOperationParameterArray=The operation parameters array contains a null element which is not allowed.
-Context_EntityMetadataBuilderIsRequired=An implementation of ODataEntityMetadataBuilder is required, but a null value was returned from GetEntityMetadataBuilder.
-Context_CannotChangeStateToAdded=The ChangeState method does not support the 'Added' state because additional information is needed for inserts. Use either AddObject or AddRelatedObject instead.
-Context_CannotChangeStateToModifiedIfNotUnchanged=The entity's state can only be changed to 'Modified' if it is currently 'Unchanged'.
-Context_CannotChangeStateIfAdded=An entity in the 'Added' state cannot be changed to '{0}', it can only be changed to 'Detached'.
-Context_OnMessageCreatingReturningNull=DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property must not return a null value. Please return a non-null value for this property.
-Context_SendingRequest_InvalidWhenUsingOnMessageCreating=SendingRequest cannot be used in combination with the DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property. Please use SendingRequest2 with DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property instead.
-Context_MustBeUsedWith='{0}' must be used with '{1}'.
-Context_EntityMediaLinksNotTrackedInEntity=The context is currently in no tracking mode, in order to use streams make sure your entities extend BaseEntityType and query the Item again from the server to populate the read link or enable tracking.
-Context_EntityInNonTrackedContextLacksMediaLinks=The context is in non tracking mode, The entity does not seem to have the media links populated properly. Please verify server response is correct and that the entity extends BaseEntityType.
-Context_DeepInsertOneTopLevelEntity=Deep insert can only have one top level entity.
-Context_DeepInsertDeletedOrModified=For deep insert, ChangeState for '{0}' cannot be Deleted or Modified.
-
-DataServiceClientFormat_LoadServiceModelRequired=When you call the UseJson method without a parameter, you must use the LoadServiceModel property to provide a valid IEdmModel instance.
-DataServiceClientFormat_ValidServiceModelRequiredForJson=To use the JSON format, you must first call DataServiceContext.Format.UseJson() and supply a valid service model.
-
-Collection_NullCollectionReference={0}.{1} must return a non-null open property collection.
-
-ClientType_MissingOpenProperty=The open object property '{0}:{1}' is not defined.
-Clienttype_MultipleOpenProperty={0} has multiple definitions for OpenObjectAttribute.
-ClientType_MissingProperty=The closed type {0} does not have a corresponding {1} settable property.
-ClientType_KeysMustBeSimpleTypes=The key property '{0}' on for type '{1}' is of type '{2}', which is not a simple type. Only properties of simple type can be key properties.
-ClientType_KeysOnDifferentDeclaredType={0} has key properties declared at different levels within its type hierarchy.
-ClientType_MissingMimeTypeProperty=Type '{0}' has a MimeTypeProperty attribute that references the MIME type property '{1}'. However, this type does not have a property '{1}'.
-ClientType_MissingMimeTypeDataProperty=Type '{0}' has a MimeTypeProperty attribute that references the data property '{1}'. However, this type does not have a property '{1}'.
-ClientType_MissingMediaEntryProperty=Type '{0}' has a MediaEntry attribute that references a property called '{1}'. However, this type does not have a property '{1}'.
-ClientType_NoSettableFields=The complex type '{0}' has no settable properties.
-ClientType_MultipleImplementationNotSupported=Multiple implementations of ICollection is not supported.
-ClientType_NullOpenProperties=The open type property '{0}' returned a null instance.
-ClientType_Ambiguous=Resolving type from '{0}' that inherits from '{1}' is ambiguous.
-ClientType_UnsupportedType=The type '{0}' is not supported by the client library.
-ClientType_CollectionOfCollectionNotSupported=Collection properties of a collection type are not supported.
-ClientType_MultipleTypesWithSameName=Multiple types were found with the same name '{0}'. Type names must be unique.
-
-WebUtil_TypeMismatchInCollection=An item in the collection property '{0}' is not of the correct type. All items in the collection property must be of the collection item type.
-WebUtil_TypeMismatchInNonPropertyCollection=A collection of item type '{0}' has an item which is not of the correct type. All items in the collection must be of the collection item type.
-ClientTypeCache_NonEntityTypeCannotContainEntityProperties=The property '{0}' is of entity type and it cannot be a property of the type '{1}', which is not of entity type. Only entity types can contain navigation properties.
-DataServiceException_GeneralError=An error occurred while processing this request.
-
-Deserialize_GetEnumerator=Only a single enumeration is supported by this IEnumerable.
-Deserialize_Current=The current value '{1}' type is not compatible with the expected '{0}' type.
-Deserialize_MixedTextWithComment=Error processing response stream. Element value interspersed with a comment is not supported.
-Deserialize_ExpectingSimpleValue=Error processing response stream. The XML element contains mixed content.
-Deserialize_MismatchEntryLinkLocalSimple=Error processing response stream. Payload has a link, local object has a simple value.
-Deserialize_MismatchEntryLinkFeedPropertyNotCollection=Error processing response stream. Payload has a feed and the property '{0}' is not a collection.
-Deserialize_MismatchEntryLinkEntryPropertyIsCollection=Error processing response stream. Payload has an entry and the property '{0}' is a collection.
-Deserialize_NoLocationHeader=The response to this POST request did not contain a 'location' header. That is not supported by this client.
-Deserialize_ServerException=Error processing response stream. Server failed with following message:\r\n{0}
-Deserialize_MissingIdElement=Error processing response stream. Missing id element in the response.
-
-Collection_NullCollectionNotSupported=The value of the property '{0}' is null. Properties that are a collection type of primitive or complex types cannot be null.
-Collection_NullNonPropertyCollectionNotSupported=The value of the collection of item type '{0}' is null. A collection cannot have a null value.
-Collection_NullCollectionItemsNotSupported=An item in the collection property has a null value. Collection properties that contain items with null values are not supported.
-Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed=A collection property of primitive types cannot contain an item of a collection type.
-Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed=A collection property of complex types cannot contain an item of a primitive type.
-
-EntityDescriptor_MissingSelfEditLink=The entity with identity '{0}' does not have a self-link or an edit-link associated with it. Please make sure that the entity has either a self-link or an edit-link associated with it.
-
-HttpProcessUtility_ContentTypeMissing=Content-Type header value missing.
-HttpProcessUtility_MediaTypeMissingValue=Media type is missing a parameter value.
-HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter=Media type requires a ';' character before a parameter definition.
-HttpProcessUtility_MediaTypeRequiresSlash=Media type requires a '/' character.
-HttpProcessUtility_MediaTypeRequiresSubType=Media type requires a subtype definition.
-HttpProcessUtility_MediaTypeUnspecified=Media type is unspecified.
-HttpProcessUtility_EncodingNotSupported=Character set '{0}' is not supported.
-HttpProcessUtility_EscapeCharWithoutQuotes=Value for MIME type parameter '{0}' is incorrect because it contained escape characters even though it was not quoted.
-HttpProcessUtility_EscapeCharAtEnd=Value for MIME type parameter '{0}' is incorrect because it terminated with escape character. Escape characters must always be followed by a character in a parameter value.
-HttpProcessUtility_ClosingQuoteNotFound=Value for MIME type parameter '{0}' is incorrect because the closing quote character could not be found while the parameter value started with a quote character.
-
-MaterializeFromObject_CountNotPresent=Count value is not part of the response stream.
-MaterializeFromObject_TopLevelLinkNotAvailable=The top level link is only available after the response has been enumerated.
-MaterializeFromObject_CollectionKeyNotPresentInLinkTable=The collection is not part of the current entry
-MaterializeFromObject_GetNestLinkForFlatCollection=This response does not contain any nested collections. Use null as Key instead.
-
-ODataRequestMessage_GetStreamMethodNotSupported=GetStream method is not supported.
-
-Util_EmptyString=Empty string.
-Util_EmptyArray=Empty array.
-Util_NullArrayElement=Array contains a null element.
-
-ALinq_UnsupportedExpression=The expression type {0} is not supported.
-ALinq_CouldNotConvert=Could not convert constant {0} expression to string.
-ALinq_MethodNotSupported=The method '{0}' is not supported.
-ALinq_UnaryNotSupported=The unary operator '{0}' is not supported.
-ALinq_BinaryNotSupported=The binary operator '{0}' is not supported.
-ALinq_ConstantNotSupported=The constant for '{0}' is not supported.
-ALinq_TypeBinaryNotSupported=An operation between an expression and a type is not supported.
-ALinq_ConditionalNotSupported=The conditional expression is not supported.
-ALinq_ParameterNotSupported=The parameter expression is not supported.
-ALinq_MemberAccessNotSupported=The member access of '{0}' is not supported.
-ALinq_LambdaNotSupported=Lambda Expressions not supported.
-ALinq_NewNotSupported=New Expressions not supported.
-ALinq_MemberInitNotSupported=Member Init Expressions not supported.
-ALinq_ListInitNotSupported=List Init Expressions not supported.
-ALinq_NewArrayNotSupported=New Array Expressions not supported.
-ALinq_InvocationNotSupported=Invocation Expressions not supported.
-ALinq_QueryOptionsOnlyAllowedOnLeafNodes=Can only specify query options (orderby, where, take, skip) after last navigation.
-ALinq_CantExpand=Expand query option not allowed.
-ALinq_CantCastToUnsupportedPrimitive=Can't cast to unsupported type '{0}'
-ALinq_CantNavigateWithoutKeyPredicate=Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type.
-ALinq_CanOnlyApplyOneKeyPredicate=Multiple key predicates cannot be specified for the same entity set.
-ALinq_CantTranslateExpression=The expression {0} is not supported.
-ALinq_TranslationError=Error translating Linq expression to URI: {0}
-ALinq_CantAddQueryOption=Custom query option not allowed.
-ALinq_CantAddDuplicateQueryOption=Can't add duplicate query option '{0}'.
-ALinq_CantAddAstoriaQueryOption=Can't add query option '{0}' because it would conflict with the query options from the translated Linq expression.
-ALinq_QueryOptionNotSupported=The query option '{0}' is not supported or is controlled by the OData service.
-ALinq_CantReferToPublicField=Referencing public field '{0}' not supported in query option expression. Use public property instead.
-ALinq_QueryOptionsOnlyAllowedOnSingletons=Cannot specify query options (orderby, where, take, skip, count) on single resource.
-ALinq_QueryOptionOutOfOrder=The {0} query option cannot be specified after the {1} query option.
-ALinq_CannotAddCountOption=Cannot add count option to the resource set.
-ALinq_CannotAddCountOptionConflict=Cannot add count option to the resource set because it would conflict with existing count options.
-ALinq_ProjectionOnlyAllowedOnLeafNodes=Can only specify 'select' query option after last navigation.
-ALinq_ProjectionCanOnlyHaveOneProjection=Cannot translate multiple Linq Select operations in a single 'select' query option.
-ALinq_ProjectionMemberAssignmentMismatch=Cannot initialize an instance of entity type '{0}' because '{1}' and '{2}' do not refer to the same source entity.
-ALinq_InvalidExpressionInNavigationPath=The expression '{0}' is not a valid expression for navigation path. The only supported operations inside the lambda expression body are MemberAccess and TypeAs. The expression must contain at least one MemberAccess and it cannot end with TypeAs.
-ALinq_ExpressionNotSupportedInProjectionToEntity=Initializing instances of the entity type {0} with the expression {1} is not supported.
-ALinq_ExpressionNotSupportedInProjection=Constructing or initializing instances of the type {0} with the expression {1} is not supported.
-ALinq_CannotConstructKnownEntityTypes=Construction of entity type instances must use object initializer with default constructor.
-ALinq_CannotCreateConstantEntity=Referencing of local entity type instances not supported when projecting results.
-ALinq_PropertyNamesMustMatchInProjections=Cannot assign the value from the {0} property to the {1} property. When projecting results into a entity type, the property names of the source type and the target type must match for the properties being projected.
-ALinq_CanOnlyProjectTheLeaf=Can only project the last entity type in the query being translated.
-ALinq_CannotProjectWithExplicitExpansion=Cannot create projection while there is an explicit expansion specified on the same query.
-ALinq_CollectionPropertyNotSupportedInOrderBy=The collection property '{0}' cannot be used in an 'orderby' query expression. Collection properties are not supported by the 'orderby' query option.
-ALinq_CollectionPropertyNotSupportedInWhere=The collection property '{0}' cannot be used in a 'where' query expression. Collection properties are only supported as the source of 'any' or 'all' methods in a 'where' query option.
-ALinq_CollectionMemberAccessNotSupportedInNavigation=Navigation to members of the collection property '{0}' in a 'select' query expression is not supported.
-ALinq_LinkPropertyNotSupportedInExpression=The property '{0}' of type 'DataServiceStreamLink' cannot be used in 'where' or 'orderby' query expressions. Properties of type 'DataServiceStreamLink' are not supported by these query options.
-ALinq_OfTypeArgumentNotAvailable=The target type for an OfType filter could not be determined.
-ALinq_CannotUseTypeFiltersMultipleTimes=Non-redundant type filters (OfType, C# 'as' and VB 'TryCast') can only be used once per resource set.
-ALinq_ExpressionCannotEndWithTypeAs=Unsupported expression '{0}' in '{1}' method. Expression cannot end with TypeAs.
-ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3=The expression 'TypeAs' is not supported when MaxProtocolVersion is less than '3.0'.
-ALinq_TypeAsArgumentNotEntityType=The type '{0}' is not an entity type. The target type for a TypeAs operator must be an entity type.
-ALinq_InvalidSourceForAnyAll=The source parameter for the '{0}' method has to be either a navigation or a collection property.
-ALinq_AnyAllNotSupportedInOrderBy=The method '{0}' is not supported by the 'orderby' query option.
-ALinq_FormatQueryOptionNotSupported=The '$format' query option is not supported. Use the DataServiceContext.Format property to set the desired format.
-ALinq_IllegalSystemQueryOption=Found the following illegal system token while building a projection or expansion path: '{0}'
-ALinq_IllegalPathStructure=Found a projection as a non-leaf segment in an expand path. Please rephrase your query. The projected property was : '{0}'
-ALinq_TypeTokenWithNoTrailingNavProp=Found an illegal type token '{0}' without a trailing navigation property.
-ALinq_ContainsNotValidOnEmptyCollection=The Contains method cannot be used with an empty collection.
-ALinq_AggregationMethodNotSupported=The aggregation method '{0}' is not supported.
-ALinq_InvalidAggregateExpression=The expression '{0}' is not a valid aggregate expression. The aggregate expression must evaluate to a single-valued property path to an aggregatable property.
-ALinq_InvalidGroupingExpression=The expression '{0}' is not a valid expression for grouping. The grouping expression must evaluate to a single-valued property path, i.e., a path ending in a single-valued primitive.
-ALinq_InvalidGroupByKeySelector=The expression '{0}' in the GroupBy key selector is not supported.
-
-DSKAttribute_MustSpecifyAtleastOnePropertyName=DataServiceKey attribute must specify at least one property name.
-
-DataServiceCollection_LoadRequiresTargetCollectionObserved=Target collection for the Load operation must have an associated DataServiceContext.
-DataServiceCollection_CannotStopTrackingChildCollection=The tracking of DataServiceCollection can not be stopped for child collections.
-DataServiceCollection_OperationForTrackedOnly=This operation is only supported on collections that are being tracked.
-DataServiceCollection_CannotDetermineContextFromItems=The DataServiceContext to which the DataServiceCollection instance belongs could not be determined. The DataServiceContext must either be supplied in the DataServiceCollection constructor or be used to create the DataServiceQuery or QueryOperationResponse object that is the source of the items in the DataServiceCollection.
-DataServiceCollection_InsertIntoTrackedButNotLoadedCollection=An item could not be added to the collection. When items in a DataServiceCollection are tracked by the DataServiceContext, new items cannot be added before items have been loaded into the collection.
-DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime=A previous LoadAsync operation has not yet completed. You cannot call the LoadAsync method on the DataServiceCollection again until the previous operation has completed.
-DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity=The LoadAsync method cannot be called when the DataServiceCollection is not a child collection of a related entity.
-DataServiceCollection_LoadAsyncRequiresDataServiceQuery=Only a typed DataServiceQuery object can be supplied when calling the LoadAsync method on DataServiceCollection.
-
-DataBinding_DataServiceCollectionArgumentMustHaveEntityType=The DataServiceCollection to be tracked must contain entity typed elements with at least one key property. The element type '{0}' does not have any key property.
-DataBinding_CollectionPropertySetterValueHasObserver=Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property '{0}' for entity type '{1}'.
-DataBinding_DataServiceCollectionChangedUnknownActionCollection=Unexpected action '{0}' on the OnCollectionChanged event raised by DataServiceCollection.
-DataBinding_CollectionChangedUnknownActionCollection=Unexpected action '{0}' on the OnCollectionChanged event raised by a collection object of type '{1}'.
-DataBinding_BindingOperation_DetachedSource=Add/Update/Delete operation cannot be performed on a child entity, if the parent entity is already detached.
-DataBinding_BindingOperation_ArrayItemNull=Null values are disallowed during '{0}' operations on DataServiceCollection.
-DataBinding_BindingOperation_ArrayItemNotEntity=A value provided during '{0}' operation on DataServiceCollection is not of an entity type with key.
-DataBinding_Util_UnknownEntitySetName=Entity set name has not been provided for an entity of type '{0}'.
-DataBinding_EntityAlreadyInCollection=An attempt was made to add entity of type '{0}' to a collection in which the same entity already exists.
-DataBinding_NotifyPropertyChangedNotImpl=An attempt to track an entity or complex type failed because the entity or complex type '{0}' does not implement the INotifyPropertyChanged interface.
-DataBinding_NotifyCollectionChangedNotImpl=An attempt to track an entity or complex type failed because the entity or complex type contains a collection property of type '{0}' that does not implement the INotifyCollectionChanged interface.
-DataBinding_ComplexObjectAssociatedWithMultipleEntities=An attempt to track a complex object of type '{0}' failed because the complex object is already being tracked.
-DataBinding_CollectionAssociatedWithMultipleEntities=An attempt to track a collection object of type '{0}' failed because the collection object is already being tracked.
-
-Parser_SingleEntry_NoneFound=Expected exactly one entry in the response from the server, but none was found.
-Parser_SingleEntry_MultipleFound=Expected exactly one entry in the response from the server, but more than one was found.
-Parser_SingleEntry_ExpectedFeedOrEntry=Expected a feed or entry in the response from the server, but found an unexpected element instead.
-
-Materializer_CannotAssignNull=The null value from property '{0}' cannot be assigned to a type '{1}'.
-Materializer_EntryIntoCollectionMismatch=An entry of type '{0}' cannot be added to a collection that contains instances of type '{1}'. This may occur when an existing entry of a different type has the same identity value or when the same entity is projected into two different types in a single query.
-Materializer_EntryToAccessIsNull=An entry returned by the navigation property '{0}' is null and cannot be initialized. You should check for a null value before accessing this property.
-Materializer_EntryToInitializeIsNull=An entry that contains the data required to create an instance of type '{0}' is null and cannot be initialized. You should check for a null value before accessing this entry.
-Materializer_ProjectEntityTypeMismatch=An entity of type '{0}' cannot be projected because there is already an instance of type '{1}' for '{2}'.
-Materializer_PropertyMissing=The expected property '{0}' could not be found while processing an entry. Check for null before accessing this property.
-Materializer_PropertyNotExpectedEntry=Property '{0}' is not an entity.
-Materializer_DataServiceCollectionNotSupportedForNonEntities=A DataServiceCollection can only contain entity types. Primitive and complex types cannot be contained by this kind of collection.
-Materializer_NoParameterlessCtorForCollectionProperty=Collection property '{0}' cannot be created because the type '{1}' does not have a public parameterless constructor.
-Materializer_InvalidCollectionItem=The element '{0}' is not a valid collection item. The name of the collection item element must be 'element' and must belong to the 'http://docs.oasis-open.org/odata/ns/data' namespace.
-Materializer_InvalidEntityType=There is a type mismatch between the client and the service. Type '{0}' is an entity type, but the type in the response payload does not represent an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client.
-Materializer_InvalidNonEntityType=There is a type mismatch between the client and the service. Type '{0}' is not an entity type, but the type in the response payload represents an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client.
-Materializer_CollectionExpectedCollection=Materialization of top level collection expected ICollection<>, but actual type was {0}.
-Materializer_InvalidResponsePayload=The response payload is a not a valid response payload. Please make sure that the top level element is a valid JSON element or belongs to '{0}' namespace.
-Materializer_InvalidContentTypeEncountered=The response content type '{0}' is not currently supported.
-Materializer_MaterializationTypeError=Cannot materialize the results into a collection type '{0}' because it does not have a parameterless constructor.
-Materializer_ResetAfterEnumeratorCreationError=Reset should never be called for collection reader in an internal enumerable.
-Materializer_TypeShouldBeCollectionError=Cannot materialize a collection of a primitives or complex without the type '{0}' being a collection.
-
-Serializer_LoopsNotAllowedInComplexTypes=A circular loop was detected while serializing the property '{0}'. You must make sure that loops are not present in properties that return a collection or complex type.
-Serializer_LoopsNotAllowedInNonPropertyComplexTypes=A circular loop was detected while serializing the complex type '{0}'. You must make sure that loops are not present in a collection or a complex type.
-Serializer_InvalidCollectionParameterItemType=The operation parameter named '{0}' has a collection item of Edm type kind '{1}'. A collection item must be either a primitive type or a complex Edm type kind.
-Serializer_NullCollectionParameterItemValue=The operation parameter named '{0}' has a null collection item. The items of a collection must not be null.
-Serializer_InvalidParameterType=The operation parameter named '{0}' was of Edm type kind '{1}'. An operation parameter must be either a primitive type, a complex type or a collection of primitive or complex types.
-Serializer_UriDoesNotContainParameterAlias=The parameter alias '{0}' was not present in the request URI. All parameters passed as alias must be present in the request URI.
-Serializer_InvalidEnumMemberValue=The enum type '{0}' has no member named '{1}'.
-
-; NOTE: error message copied from Silverlight because the portable library requires this
-DataServiceQuery_EnumerationNotSupported=This target framework does not enable you to directly enumerate over a data service query. This is because enumeration automatically sends a synchronous request to the data service. Because this framework only supports asynchronous operations, you must instead call the BeginExecute and EndExecute methods to obtain a query result that supports enumeration.
-
-; NOTE: Moved over to common as this is used in the portable library
-Context_SendingRequestEventArgsNotHttp=Only instances of HttpWebRequest are currently allowed for this property. Other subtypes of WebRequest are not supported.
-
-; NOTE: these error messages are copied from ODL because they appear in shared source files.
-General_InternalError=An internal error '{0}' occurred.
-
-ODataMetadataBuilder_MissingEntitySetUri=The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required.
-ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix=The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments.
-ODataMetadataBuilder_MissingEntityInstanceUri=Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required.
-
-EdmValueUtils_UnsupportedPrimitiveType=The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type.
-EdmValueUtils_IncorrectPrimitiveTypeKind=Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'.
-EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName=Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'.
-EdmValueUtils_CannotConvertTypeToClrValue=A value with primitive kind '{0}' cannot be converted into a primitive object value.
-
-; NOTE: these error messages are copied from EdmLib because they appear in shared source files.
-ValueParser_InvalidDuration=The value '{0}' is not a valid duration value.
-
-; Note: The below list of error messages are common to the ODataLib, EdmLib, Spatial, Server and Client projects.
-PlatformHelper_DateTimeOffsetMustContainTimeZone=The time zone information is missing on the DateTimeOffset value '{0}'. A DateTimeOffset value must contain the time zone information.
-;END
diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.Desktop.txt b/src/Microsoft.OData.Client/Microsoft.OData.Client.Desktop.txt
deleted file mode 100644
index a161214a6f..0000000000
--- a/src/Microsoft.OData.Client/Microsoft.OData.Client.Desktop.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-
-; NOTE: don't use \", use ' instead
-; NOTE: don't use #, use ; instead for comments
-; NOTE: leave the [strings] alone
-
-; See ResourceManager documentation and the ResGen tool.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error Messages
-
-DataServiceRequest_FailGetCount=Failed to get the count value from the server.
-DataServiceRequest_FailGetValue=Failed to get the value from the server.
-
-Context_ExecuteExpectedVoidResponse=Execute overload for void service operations and actions received a non-void response from the server.
-;END
diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.cs b/src/Microsoft.OData.Client/Microsoft.OData.Client.cs
deleted file mode 100644
index 7b22649e81..0000000000
--- a/src/Microsoft.OData.Client/Microsoft.OData.Client.cs
+++ /dev/null
@@ -1,365 +0,0 @@
-//
-
-//---------------------------------------------------------------------
-//
-// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
-//
-// GENERATED FILE. DO NOT MODIFY.
-//
-//
-//---------------------------------------------------------------------
-
-using System;
-using System.Globalization;
-using System.Reflection;
-using System.Resources;
-using System.Threading;
-
-namespace Microsoft.OData.Client
-{
- ///
- /// AutoGenerated resource class. Usage:
- ///
- /// string s = TextRes.GetString(TextRes.MyIdentifier);
- ///
- internal sealed class TextRes {
- internal const string Batch_ExpectedContentType = "Batch_ExpectedContentType";
- internal const string Batch_ExpectedResponse = "Batch_ExpectedResponse";
- internal const string Batch_IncompleteResponseCount = "Batch_IncompleteResponseCount";
- internal const string Batch_UnexpectedContent = "Batch_UnexpectedContent";
- internal const string Context_BaseUri = "Context_BaseUri";
- internal const string Context_BaseUriRequired = "Context_BaseUriRequired";
- internal const string Context_ResolveReturnedInvalidUri = "Context_ResolveReturnedInvalidUri";
- internal const string Context_RequestUriIsRelativeBaseUriRequired = "Context_RequestUriIsRelativeBaseUriRequired";
- internal const string Context_ResolveEntitySetOrBaseUriRequired = "Context_ResolveEntitySetOrBaseUriRequired";
- internal const string Context_CannotConvertKey = "Context_CannotConvertKey";
- internal const string Context_TrackingExpectsAbsoluteUri = "Context_TrackingExpectsAbsoluteUri";
- internal const string Context_LocationHeaderExpectsAbsoluteUri = "Context_LocationHeaderExpectsAbsoluteUri";
- internal const string Context_LinkResourceInsertFailure = "Context_LinkResourceInsertFailure";
- internal const string Context_InternalError = "Context_InternalError";
- internal const string Context_BatchExecuteError = "Context_BatchExecuteError";
- internal const string Context_EntitySetName = "Context_EntitySetName";
- internal const string Context_BatchNotSupportedForNamedStreams = "Context_BatchNotSupportedForNamedStreams";
- internal const string Context_SetSaveStreamWithoutNamedStreamEditLink = "Context_SetSaveStreamWithoutNamedStreamEditLink";
- internal const string Content_EntityWithoutKey = "Content_EntityWithoutKey";
- internal const string Content_EntityIsNotEntityType = "Content_EntityIsNotEntityType";
- internal const string Context_EntityNotContained = "Context_EntityNotContained";
- internal const string Context_EntityAlreadyContained = "Context_EntityAlreadyContained";
- internal const string Context_DifferentEntityAlreadyContained = "Context_DifferentEntityAlreadyContained";
- internal const string Context_DidNotOriginateAsync = "Context_DidNotOriginateAsync";
- internal const string Context_AsyncAlreadyDone = "Context_AsyncAlreadyDone";
- internal const string Context_OperationCanceled = "Context_OperationCanceled";
- internal const string Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX = "Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX";
- internal const string Context_NoLoadWithInsertEnd = "Context_NoLoadWithInsertEnd";
- internal const string Context_NoRelationWithInsertEnd = "Context_NoRelationWithInsertEnd";
- internal const string Context_NoRelationWithDeleteEnd = "Context_NoRelationWithDeleteEnd";
- internal const string Context_RelationAlreadyContained = "Context_RelationAlreadyContained";
- internal const string Context_RelationNotRefOrCollection = "Context_RelationNotRefOrCollection";
- internal const string Context_AddLinkCollectionOnly = "Context_AddLinkCollectionOnly";
- internal const string Context_AddRelatedObjectCollectionOnly = "Context_AddRelatedObjectCollectionOnly";
- internal const string Context_AddRelatedObjectSourceDeleted = "Context_AddRelatedObjectSourceDeleted";
- internal const string Context_UpdateRelatedObjectNonCollectionOnly = "Context_UpdateRelatedObjectNonCollectionOnly";
- internal const string Context_SetLinkReferenceOnly = "Context_SetLinkReferenceOnly";
- internal const string Context_SetRelatedObjectNonCollectionOnly = "Context_SetRelatedObjectNonCollectionOnly";
- internal const string Context_SetRelatedObjectSourceDeleted = "Context_SetRelatedObjectSourceDeleted";
- internal const string Context_SetRelatedObjectLinkNonCollectionOnly = "Context_SetRelatedObjectLinkNonCollectionOnly";
- internal const string Context_SetRelatedObjectLinkSourceDeleted = "Context_SetRelatedObjectLinkSourceDeleted";
- internal const string Context_NoContentTypeForMediaLink = "Context_NoContentTypeForMediaLink";
- internal const string Context_BatchNotSupportedForMediaLink = "Context_BatchNotSupportedForMediaLink";
- internal const string Context_UnexpectedZeroRawRead = "Context_UnexpectedZeroRawRead";
- internal const string Context_VersionNotSupported = "Context_VersionNotSupported";
- internal const string Context_ResponseVersionIsBiggerThanProtocolVersion = "Context_ResponseVersionIsBiggerThanProtocolVersion";
- internal const string Context_RequestVersionIsBiggerThanProtocolVersion = "Context_RequestVersionIsBiggerThanProtocolVersion";
- internal const string Context_ChildResourceExists = "Context_ChildResourceExists";
- internal const string Context_ContentTypeRequiredForNamedStream = "Context_ContentTypeRequiredForNamedStream";
- internal const string Context_EntityNotMediaLinkEntry = "Context_EntityNotMediaLinkEntry";
- internal const string Context_MLEWithoutSaveStream = "Context_MLEWithoutSaveStream";
- internal const string Context_SetSaveStreamOnMediaEntryProperty = "Context_SetSaveStreamOnMediaEntryProperty";
- internal const string Context_SetSaveStreamWithoutEditMediaLink = "Context_SetSaveStreamWithoutEditMediaLink";
- internal const string Context_SetSaveStreamOnInvalidEntityState = "Context_SetSaveStreamOnInvalidEntityState";
- internal const string Context_EntityDoesNotContainNamedStream = "Context_EntityDoesNotContainNamedStream";
- internal const string Context_MissingSelfAndEditLinkForNamedStream = "Context_MissingSelfAndEditLinkForNamedStream";
- internal const string Context_BothLocationAndIdMustBeSpecified = "Context_BothLocationAndIdMustBeSpecified";
- internal const string Context_BodyOperationParametersNotAllowedWithGet = "Context_BodyOperationParametersNotAllowedWithGet";
- internal const string Context_MissingOperationParameterName = "Context_MissingOperationParameterName";
- internal const string Context_DuplicateUriOperationParameterName = "Context_DuplicateUriOperationParameterName";
- internal const string Context_DuplicateBodyOperationParameterName = "Context_DuplicateBodyOperationParameterName";
- internal const string Context_NullKeysAreNotSupported = "Context_NullKeysAreNotSupported";
- internal const string Context_ExecuteExpectsGetOrPostOrDelete = "Context_ExecuteExpectsGetOrPostOrDelete";
- internal const string Context_EndExecuteExpectedVoidResponse = "Context_EndExecuteExpectedVoidResponse";
- internal const string Context_NullElementInOperationParameterArray = "Context_NullElementInOperationParameterArray";
- internal const string Context_EntityMetadataBuilderIsRequired = "Context_EntityMetadataBuilderIsRequired";
- internal const string Context_CannotChangeStateToAdded = "Context_CannotChangeStateToAdded";
- internal const string Context_CannotChangeStateToModifiedIfNotUnchanged = "Context_CannotChangeStateToModifiedIfNotUnchanged";
- internal const string Context_CannotChangeStateIfAdded = "Context_CannotChangeStateIfAdded";
- internal const string Context_OnMessageCreatingReturningNull = "Context_OnMessageCreatingReturningNull";
- internal const string Context_SendingRequest_InvalidWhenUsingOnMessageCreating = "Context_SendingRequest_InvalidWhenUsingOnMessageCreating";
- internal const string Context_MustBeUsedWith = "Context_MustBeUsedWith";
- internal const string Context_EntityMediaLinksNotTrackedInEntity = "Context_EntityMediaLinksNotTrackedInEntity";
- internal const string Context_EntityInNonTrackedContextLacksMediaLinks = "Context_EntityInNonTrackedContextLacksMediaLinks";
- internal const string Context_DeepInsertOneTopLevelEntity = "Context_DeepInsertOneTopLevelEntity";
- internal const string Context_DeepInsertDeletedOrModified = "Context_DeepInsertDeletedOrModified";
- internal const string DataServiceClientFormat_LoadServiceModelRequired = "DataServiceClientFormat_LoadServiceModelRequired";
- internal const string DataServiceClientFormat_ValidServiceModelRequiredForJson = "DataServiceClientFormat_ValidServiceModelRequiredForJson";
- internal const string Collection_NullCollectionReference = "Collection_NullCollectionReference";
- internal const string ClientType_MissingOpenProperty = "ClientType_MissingOpenProperty";
- internal const string Clienttype_MultipleOpenProperty = "Clienttype_MultipleOpenProperty";
- internal const string ClientType_MissingProperty = "ClientType_MissingProperty";
- internal const string ClientType_KeysMustBeSimpleTypes = "ClientType_KeysMustBeSimpleTypes";
- internal const string ClientType_KeysOnDifferentDeclaredType = "ClientType_KeysOnDifferentDeclaredType";
- internal const string ClientType_MissingMimeTypeProperty = "ClientType_MissingMimeTypeProperty";
- internal const string ClientType_MissingMimeTypeDataProperty = "ClientType_MissingMimeTypeDataProperty";
- internal const string ClientType_MissingMediaEntryProperty = "ClientType_MissingMediaEntryProperty";
- internal const string ClientType_NoSettableFields = "ClientType_NoSettableFields";
- internal const string ClientType_MultipleImplementationNotSupported = "ClientType_MultipleImplementationNotSupported";
- internal const string ClientType_NullOpenProperties = "ClientType_NullOpenProperties";
- internal const string ClientType_Ambiguous = "ClientType_Ambiguous";
- internal const string ClientType_UnsupportedType = "ClientType_UnsupportedType";
- internal const string ClientType_CollectionOfCollectionNotSupported = "ClientType_CollectionOfCollectionNotSupported";
- internal const string ClientType_MultipleTypesWithSameName = "ClientType_MultipleTypesWithSameName";
- internal const string WebUtil_TypeMismatchInCollection = "WebUtil_TypeMismatchInCollection";
- internal const string WebUtil_TypeMismatchInNonPropertyCollection = "WebUtil_TypeMismatchInNonPropertyCollection";
- internal const string ClientTypeCache_NonEntityTypeCannotContainEntityProperties = "ClientTypeCache_NonEntityTypeCannotContainEntityProperties";
- internal const string DataServiceException_GeneralError = "DataServiceException_GeneralError";
- internal const string Deserialize_GetEnumerator = "Deserialize_GetEnumerator";
- internal const string Deserialize_Current = "Deserialize_Current";
- internal const string Deserialize_MixedTextWithComment = "Deserialize_MixedTextWithComment";
- internal const string Deserialize_ExpectingSimpleValue = "Deserialize_ExpectingSimpleValue";
- internal const string Deserialize_MismatchEntryLinkLocalSimple = "Deserialize_MismatchEntryLinkLocalSimple";
- internal const string Deserialize_MismatchEntryLinkFeedPropertyNotCollection = "Deserialize_MismatchEntryLinkFeedPropertyNotCollection";
- internal const string Deserialize_MismatchEntryLinkEntryPropertyIsCollection = "Deserialize_MismatchEntryLinkEntryPropertyIsCollection";
- internal const string Deserialize_NoLocationHeader = "Deserialize_NoLocationHeader";
- internal const string Deserialize_ServerException = "Deserialize_ServerException";
- internal const string Deserialize_MissingIdElement = "Deserialize_MissingIdElement";
- internal const string Collection_NullCollectionNotSupported = "Collection_NullCollectionNotSupported";
- internal const string Collection_NullNonPropertyCollectionNotSupported = "Collection_NullNonPropertyCollectionNotSupported";
- internal const string Collection_NullCollectionItemsNotSupported = "Collection_NullCollectionItemsNotSupported";
- internal const string Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed = "Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed";
- internal const string Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed = "Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed";
- internal const string EntityDescriptor_MissingSelfEditLink = "EntityDescriptor_MissingSelfEditLink";
- internal const string HttpProcessUtility_ContentTypeMissing = "HttpProcessUtility_ContentTypeMissing";
- internal const string HttpProcessUtility_MediaTypeMissingValue = "HttpProcessUtility_MediaTypeMissingValue";
- internal const string HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter = "HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter";
- internal const string HttpProcessUtility_MediaTypeRequiresSlash = "HttpProcessUtility_MediaTypeRequiresSlash";
- internal const string HttpProcessUtility_MediaTypeRequiresSubType = "HttpProcessUtility_MediaTypeRequiresSubType";
- internal const string HttpProcessUtility_MediaTypeUnspecified = "HttpProcessUtility_MediaTypeUnspecified";
- internal const string HttpProcessUtility_EncodingNotSupported = "HttpProcessUtility_EncodingNotSupported";
- internal const string HttpProcessUtility_EscapeCharWithoutQuotes = "HttpProcessUtility_EscapeCharWithoutQuotes";
- internal const string HttpProcessUtility_EscapeCharAtEnd = "HttpProcessUtility_EscapeCharAtEnd";
- internal const string HttpProcessUtility_ClosingQuoteNotFound = "HttpProcessUtility_ClosingQuoteNotFound";
- internal const string MaterializeFromObject_CountNotPresent = "MaterializeFromObject_CountNotPresent";
- internal const string MaterializeFromObject_TopLevelLinkNotAvailable = "MaterializeFromObject_TopLevelLinkNotAvailable";
- internal const string MaterializeFromObject_CollectionKeyNotPresentInLinkTable = "MaterializeFromObject_CollectionKeyNotPresentInLinkTable";
- internal const string MaterializeFromObject_GetNestLinkForFlatCollection = "MaterializeFromObject_GetNestLinkForFlatCollection";
- internal const string ODataRequestMessage_GetStreamMethodNotSupported = "ODataRequestMessage_GetStreamMethodNotSupported";
- internal const string Util_EmptyString = "Util_EmptyString";
- internal const string Util_EmptyArray = "Util_EmptyArray";
- internal const string Util_NullArrayElement = "Util_NullArrayElement";
- internal const string ALinq_UnsupportedExpression = "ALinq_UnsupportedExpression";
- internal const string ALinq_CouldNotConvert = "ALinq_CouldNotConvert";
- internal const string ALinq_MethodNotSupported = "ALinq_MethodNotSupported";
- internal const string ALinq_UnaryNotSupported = "ALinq_UnaryNotSupported";
- internal const string ALinq_BinaryNotSupported = "ALinq_BinaryNotSupported";
- internal const string ALinq_ConstantNotSupported = "ALinq_ConstantNotSupported";
- internal const string ALinq_TypeBinaryNotSupported = "ALinq_TypeBinaryNotSupported";
- internal const string ALinq_ConditionalNotSupported = "ALinq_ConditionalNotSupported";
- internal const string ALinq_ParameterNotSupported = "ALinq_ParameterNotSupported";
- internal const string ALinq_MemberAccessNotSupported = "ALinq_MemberAccessNotSupported";
- internal const string ALinq_LambdaNotSupported = "ALinq_LambdaNotSupported";
- internal const string ALinq_NewNotSupported = "ALinq_NewNotSupported";
- internal const string ALinq_MemberInitNotSupported = "ALinq_MemberInitNotSupported";
- internal const string ALinq_ListInitNotSupported = "ALinq_ListInitNotSupported";
- internal const string ALinq_NewArrayNotSupported = "ALinq_NewArrayNotSupported";
- internal const string ALinq_InvocationNotSupported = "ALinq_InvocationNotSupported";
- internal const string ALinq_QueryOptionsOnlyAllowedOnLeafNodes = "ALinq_QueryOptionsOnlyAllowedOnLeafNodes";
- internal const string ALinq_CantExpand = "ALinq_CantExpand";
- internal const string ALinq_CantCastToUnsupportedPrimitive = "ALinq_CantCastToUnsupportedPrimitive";
- internal const string ALinq_CantNavigateWithoutKeyPredicate = "ALinq_CantNavigateWithoutKeyPredicate";
- internal const string ALinq_CanOnlyApplyOneKeyPredicate = "ALinq_CanOnlyApplyOneKeyPredicate";
- internal const string ALinq_CantTranslateExpression = "ALinq_CantTranslateExpression";
- internal const string ALinq_TranslationError = "ALinq_TranslationError";
- internal const string ALinq_CantAddQueryOption = "ALinq_CantAddQueryOption";
- internal const string ALinq_CantAddDuplicateQueryOption = "ALinq_CantAddDuplicateQueryOption";
- internal const string ALinq_CantAddAstoriaQueryOption = "ALinq_CantAddAstoriaQueryOption";
- internal const string ALinq_QueryOptionNotSupported = "ALinq_QueryOptionNotSupported";
- internal const string ALinq_CantReferToPublicField = "ALinq_CantReferToPublicField";
- internal const string ALinq_QueryOptionsOnlyAllowedOnSingletons = "ALinq_QueryOptionsOnlyAllowedOnSingletons";
- internal const string ALinq_QueryOptionOutOfOrder = "ALinq_QueryOptionOutOfOrder";
- internal const string ALinq_CannotAddCountOption = "ALinq_CannotAddCountOption";
- internal const string ALinq_CannotAddCountOptionConflict = "ALinq_CannotAddCountOptionConflict";
- internal const string ALinq_ProjectionOnlyAllowedOnLeafNodes = "ALinq_ProjectionOnlyAllowedOnLeafNodes";
- internal const string ALinq_ProjectionCanOnlyHaveOneProjection = "ALinq_ProjectionCanOnlyHaveOneProjection";
- internal const string ALinq_ProjectionMemberAssignmentMismatch = "ALinq_ProjectionMemberAssignmentMismatch";
- internal const string ALinq_InvalidExpressionInNavigationPath = "ALinq_InvalidExpressionInNavigationPath";
- internal const string ALinq_ExpressionNotSupportedInProjectionToEntity = "ALinq_ExpressionNotSupportedInProjectionToEntity";
- internal const string ALinq_ExpressionNotSupportedInProjection = "ALinq_ExpressionNotSupportedInProjection";
- internal const string ALinq_CannotConstructKnownEntityTypes = "ALinq_CannotConstructKnownEntityTypes";
- internal const string ALinq_CannotCreateConstantEntity = "ALinq_CannotCreateConstantEntity";
- internal const string ALinq_PropertyNamesMustMatchInProjections = "ALinq_PropertyNamesMustMatchInProjections";
- internal const string ALinq_CanOnlyProjectTheLeaf = "ALinq_CanOnlyProjectTheLeaf";
- internal const string ALinq_CannotProjectWithExplicitExpansion = "ALinq_CannotProjectWithExplicitExpansion";
- internal const string ALinq_CollectionPropertyNotSupportedInOrderBy = "ALinq_CollectionPropertyNotSupportedInOrderBy";
- internal const string ALinq_CollectionPropertyNotSupportedInWhere = "ALinq_CollectionPropertyNotSupportedInWhere";
- internal const string ALinq_CollectionMemberAccessNotSupportedInNavigation = "ALinq_CollectionMemberAccessNotSupportedInNavigation";
- internal const string ALinq_LinkPropertyNotSupportedInExpression = "ALinq_LinkPropertyNotSupportedInExpression";
- internal const string ALinq_OfTypeArgumentNotAvailable = "ALinq_OfTypeArgumentNotAvailable";
- internal const string ALinq_CannotUseTypeFiltersMultipleTimes = "ALinq_CannotUseTypeFiltersMultipleTimes";
- internal const string ALinq_ExpressionCannotEndWithTypeAs = "ALinq_ExpressionCannotEndWithTypeAs";
- internal const string ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3 = "ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3";
- internal const string ALinq_TypeAsArgumentNotEntityType = "ALinq_TypeAsArgumentNotEntityType";
- internal const string ALinq_InvalidSourceForAnyAll = "ALinq_InvalidSourceForAnyAll";
- internal const string ALinq_AnyAllNotSupportedInOrderBy = "ALinq_AnyAllNotSupportedInOrderBy";
- internal const string ALinq_FormatQueryOptionNotSupported = "ALinq_FormatQueryOptionNotSupported";
- internal const string ALinq_IllegalSystemQueryOption = "ALinq_IllegalSystemQueryOption";
- internal const string ALinq_IllegalPathStructure = "ALinq_IllegalPathStructure";
- internal const string ALinq_TypeTokenWithNoTrailingNavProp = "ALinq_TypeTokenWithNoTrailingNavProp";
- internal const string ALinq_ContainsNotValidOnEmptyCollection = "ALinq_ContainsNotValidOnEmptyCollection";
- internal const string ALinq_AggregationMethodNotSupported = "ALinq_AggregationMethodNotSupported";
- internal const string ALinq_InvalidAggregateExpression = "ALinq_InvalidAggregateExpression";
- internal const string ALinq_InvalidGroupingExpression = "ALinq_InvalidGroupingExpression";
- internal const string ALinq_InvalidGroupByKeySelector = "ALinq_InvalidGroupByKeySelector";
- internal const string DSKAttribute_MustSpecifyAtleastOnePropertyName = "DSKAttribute_MustSpecifyAtleastOnePropertyName";
- internal const string DataServiceCollection_LoadRequiresTargetCollectionObserved = "DataServiceCollection_LoadRequiresTargetCollectionObserved";
- internal const string DataServiceCollection_CannotStopTrackingChildCollection = "DataServiceCollection_CannotStopTrackingChildCollection";
- internal const string DataServiceCollection_OperationForTrackedOnly = "DataServiceCollection_OperationForTrackedOnly";
- internal const string DataServiceCollection_CannotDetermineContextFromItems = "DataServiceCollection_CannotDetermineContextFromItems";
- internal const string DataServiceCollection_InsertIntoTrackedButNotLoadedCollection = "DataServiceCollection_InsertIntoTrackedButNotLoadedCollection";
- internal const string DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime = "DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime";
- internal const string DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity = "DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity";
- internal const string DataServiceCollection_LoadAsyncRequiresDataServiceQuery = "DataServiceCollection_LoadAsyncRequiresDataServiceQuery";
- internal const string DataBinding_DataServiceCollectionArgumentMustHaveEntityType = "DataBinding_DataServiceCollectionArgumentMustHaveEntityType";
- internal const string DataBinding_CollectionPropertySetterValueHasObserver = "DataBinding_CollectionPropertySetterValueHasObserver";
- internal const string DataBinding_DataServiceCollectionChangedUnknownActionCollection = "DataBinding_DataServiceCollectionChangedUnknownActionCollection";
- internal const string DataBinding_CollectionChangedUnknownActionCollection = "DataBinding_CollectionChangedUnknownActionCollection";
- internal const string DataBinding_BindingOperation_DetachedSource = "DataBinding_BindingOperation_DetachedSource";
- internal const string DataBinding_BindingOperation_ArrayItemNull = "DataBinding_BindingOperation_ArrayItemNull";
- internal const string DataBinding_BindingOperation_ArrayItemNotEntity = "DataBinding_BindingOperation_ArrayItemNotEntity";
- internal const string DataBinding_Util_UnknownEntitySetName = "DataBinding_Util_UnknownEntitySetName";
- internal const string DataBinding_EntityAlreadyInCollection = "DataBinding_EntityAlreadyInCollection";
- internal const string DataBinding_NotifyPropertyChangedNotImpl = "DataBinding_NotifyPropertyChangedNotImpl";
- internal const string DataBinding_NotifyCollectionChangedNotImpl = "DataBinding_NotifyCollectionChangedNotImpl";
- internal const string DataBinding_ComplexObjectAssociatedWithMultipleEntities = "DataBinding_ComplexObjectAssociatedWithMultipleEntities";
- internal const string DataBinding_CollectionAssociatedWithMultipleEntities = "DataBinding_CollectionAssociatedWithMultipleEntities";
- internal const string Parser_SingleEntry_NoneFound = "Parser_SingleEntry_NoneFound";
- internal const string Parser_SingleEntry_MultipleFound = "Parser_SingleEntry_MultipleFound";
- internal const string Parser_SingleEntry_ExpectedFeedOrEntry = "Parser_SingleEntry_ExpectedFeedOrEntry";
- internal const string Materializer_CannotAssignNull = "Materializer_CannotAssignNull";
- internal const string Materializer_EntryIntoCollectionMismatch = "Materializer_EntryIntoCollectionMismatch";
- internal const string Materializer_EntryToAccessIsNull = "Materializer_EntryToAccessIsNull";
- internal const string Materializer_EntryToInitializeIsNull = "Materializer_EntryToInitializeIsNull";
- internal const string Materializer_ProjectEntityTypeMismatch = "Materializer_ProjectEntityTypeMismatch";
- internal const string Materializer_PropertyMissing = "Materializer_PropertyMissing";
- internal const string Materializer_PropertyNotExpectedEntry = "Materializer_PropertyNotExpectedEntry";
- internal const string Materializer_DataServiceCollectionNotSupportedForNonEntities = "Materializer_DataServiceCollectionNotSupportedForNonEntities";
- internal const string Materializer_NoParameterlessCtorForCollectionProperty = "Materializer_NoParameterlessCtorForCollectionProperty";
- internal const string Materializer_InvalidCollectionItem = "Materializer_InvalidCollectionItem";
- internal const string Materializer_InvalidEntityType = "Materializer_InvalidEntityType";
- internal const string Materializer_InvalidNonEntityType = "Materializer_InvalidNonEntityType";
- internal const string Materializer_CollectionExpectedCollection = "Materializer_CollectionExpectedCollection";
- internal const string Materializer_InvalidResponsePayload = "Materializer_InvalidResponsePayload";
- internal const string Materializer_InvalidContentTypeEncountered = "Materializer_InvalidContentTypeEncountered";
- internal const string Materializer_MaterializationTypeError = "Materializer_MaterializationTypeError";
- internal const string Materializer_ResetAfterEnumeratorCreationError = "Materializer_ResetAfterEnumeratorCreationError";
- internal const string Materializer_TypeShouldBeCollectionError = "Materializer_TypeShouldBeCollectionError";
- internal const string Serializer_LoopsNotAllowedInComplexTypes = "Serializer_LoopsNotAllowedInComplexTypes";
- internal const string Serializer_LoopsNotAllowedInNonPropertyComplexTypes = "Serializer_LoopsNotAllowedInNonPropertyComplexTypes";
- internal const string Serializer_InvalidCollectionParameterItemType = "Serializer_InvalidCollectionParameterItemType";
- internal const string Serializer_NullCollectionParameterItemValue = "Serializer_NullCollectionParameterItemValue";
- internal const string Serializer_InvalidParameterType = "Serializer_InvalidParameterType";
- internal const string Serializer_UriDoesNotContainParameterAlias = "Serializer_UriDoesNotContainParameterAlias";
- internal const string Serializer_InvalidEnumMemberValue = "Serializer_InvalidEnumMemberValue";
- internal const string DataServiceQuery_EnumerationNotSupported = "DataServiceQuery_EnumerationNotSupported";
- internal const string Context_SendingRequestEventArgsNotHttp = "Context_SendingRequestEventArgsNotHttp";
- internal const string General_InternalError = "General_InternalError";
- internal const string ODataMetadataBuilder_MissingEntitySetUri = "ODataMetadataBuilder_MissingEntitySetUri";
- internal const string ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix = "ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix";
- internal const string ODataMetadataBuilder_MissingEntityInstanceUri = "ODataMetadataBuilder_MissingEntityInstanceUri";
- internal const string EdmValueUtils_UnsupportedPrimitiveType = "EdmValueUtils_UnsupportedPrimitiveType";
- internal const string EdmValueUtils_IncorrectPrimitiveTypeKind = "EdmValueUtils_IncorrectPrimitiveTypeKind";
- internal const string EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName = "EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName";
- internal const string EdmValueUtils_CannotConvertTypeToClrValue = "EdmValueUtils_CannotConvertTypeToClrValue";
- internal const string ValueParser_InvalidDuration = "ValueParser_InvalidDuration";
- internal const string PlatformHelper_DateTimeOffsetMustContainTimeZone = "PlatformHelper_DateTimeOffsetMustContainTimeZone";
- internal const string DataServiceRequest_FailGetCount = "DataServiceRequest_FailGetCount";
- internal const string DataServiceRequest_FailGetValue = "DataServiceRequest_FailGetValue";
- internal const string Context_ExecuteExpectedVoidResponse = "Context_ExecuteExpectedVoidResponse";
-
- static TextRes loader = null;
- ResourceManager resources;
-
- internal TextRes()
- {
- resources = new System.Resources.ResourceManager("Microsoft.OData.Client", this.GetType().GetTypeInfo().Assembly);
- }
-
- private static TextRes GetLoader()
- {
- if (loader == null)
- {
- TextRes sr = new TextRes();
- Interlocked.CompareExchange(ref loader, sr, null);
- }
-
- return loader;
- }
-
- private static CultureInfo Culture
- {
- get { return null/*use ResourceManager default, CultureInfo.CurrentUICulture*/; }
- }
-
- public static ResourceManager Resources
- {
- get
- {
- return GetLoader().resources;
- }
- }
-
- public static string GetString(string name, params object[] args)
- {
- TextRes sys = GetLoader();
- if (sys == null)
- {
- return null;
- }
-
- string res = sys.resources.GetString(name, TextRes.Culture);
-
- if (args != null && args.Length > 0)
- {
- for (int i = 0; i < args.Length; i ++)
- {
- String value = args[i] as String;
- if (value != null && value.Length > 1024)
- {
- args[i] = value.Substring(0, 1024 - 3) + "...";
- }
- }
- return String.Format(CultureInfo.CurrentCulture, res, args);
- }
- else
- {
- return res;
- }
- }
-
- public static string GetString(string name)
- {
- TextRes sys = GetLoader();
- if (sys == null)
- {
- return null;
- }
-
- return sys.resources.GetString(name, TextRes.Culture);
- }
-
- public static string GetString(string name, out bool usedFallback)
- {
- // always false for this version of gensr
- usedFallback = false;
- return GetString(name);
- }
- }
-}
diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj b/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj
index cba7753665..18144f5028 100644
--- a/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj
+++ b/src/Microsoft.OData.Client/Microsoft.OData.Client.csproj
@@ -31,10 +31,8 @@
-
-
@@ -105,48 +103,6 @@
-
-
- TextTemplatingFileGenerator
- Microsoft.OData.Client.cs
-
-
- TextTemplatingFileGenerator
- Parameterized.Microsoft.OData.Client.cs
-
-
-
-
-
- True
- True
- Microsoft.OData.Client.tt
-
-
- True
- True
- Parameterized.Microsoft.OData.Client.tt
-
-
-
-
-
- Microsoft.OData.Client
- true
- true
- internal
- true
- Microsoft.OData.Client.TextRes
- skip
-
-
-
-
-
-
-
-
-
@@ -176,13 +132,21 @@
-
- TextTemplatingFileGenerator
- Microsoft.OData.Client.cs
-
+
-
+
+ ResXFileCodeGenerator
+ SRResources.Designer.cs
+
+
+
+ True
+ True
+ SRResources.resx
+
+
+
diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.tt b/src/Microsoft.OData.Client/Microsoft.OData.Client.tt
deleted file mode 100644
index 7b29f79e99..0000000000
--- a/src/Microsoft.OData.Client/Microsoft.OData.Client.tt
+++ /dev/null
@@ -1,20 +0,0 @@
-<#@ include file="..\..\tools\StringResourceGenerator\ResourceClassGenerator2.ttinclude" #>
-<#+
-public static class Configuration
-{
- // The namespace where the generated resource classes reside.
- public const string ResourceClassNamespace = "Microsoft.OData.Client";
-
- // The assembly name where the generated resource classes will be linked.
- public const string AssemblyName = "Microsoft.OData.Client";
-
- // The name of the generated resource class.
- public const string ResourceClassName = "TextRes";
-
- // The list of text files containing all the string resources.
- public static readonly string[] TextFiles = {
- "Microsoft.OData.Client.Common.txt",
- "Microsoft.OData.Client.Desktop.txt"
- };
-}
-#>
\ No newline at end of file
diff --git a/src/Microsoft.OData.Client/Microsoft.OData.Client.txt b/src/Microsoft.OData.Client/Microsoft.OData.Client.txt
deleted file mode 100644
index d944564a9d..0000000000
--- a/src/Microsoft.OData.Client/Microsoft.OData.Client.txt
+++ /dev/null
@@ -1,317 +0,0 @@
-
-; NOTE: don't use \", use ' instead
-; NOTE: don't use #, use ; instead for comments
-; NOTE: leave the [strings] alone
-
-; See ResourceManager documentation and the ResGen tool.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error Messages
-
-Batch_ExpectedContentType=The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "{0}".
-Batch_ExpectedResponse=The POST request expected a response with content. ID={0}
-Batch_IncompleteResponseCount=Not all requests in the batch had a response.
-Batch_UnexpectedContent=The web response contained unexpected sections. ID={0}
-
-Context_BaseUri=Expected an absolute, well formed http URL without a query or fragment.
-Context_BaseUriRequired=You must set the BaseUri property before you perform this operation.
-Context_ResolveReturnedInvalidUri=The Uri that is returned by the ResolveEntitySet function must be an absolute, well-formed URL with an "http" or "https" scheme name and without any query strings or fragment identifiers.
-Context_RequestUriIsRelativeBaseUriRequired=Because the requestUri is a relative Uri, you must set the BaseUri property on the DataServiceContext.
-Context_ResolveEntitySetOrBaseUriRequired=The ResolveEntitySet function must return a non-null Uri for the EntitySet '{0}', otherwise you must set the BaseUri property.
-Context_CannotConvertKey=Unable to convert value '{0}' into a key string for a URI.
-Context_TrackingExpectsAbsoluteUri=The identity value specified by either the the OData-EntityId header must be an absolute URI.
-Context_LocationHeaderExpectsAbsoluteUri=The 'Location' header value specified in the response must be an absolute URI.
-Context_LinkResourceInsertFailure=One of the link's resources failed to insert.
-Context_InternalError=Microsoft.OData.Client internal error {0}.
-Context_BatchExecuteError=An error occurred for this query during batch execution. See the inner exception for details.
-Context_EntitySetName=Expected a relative URL path without query or fragment.
-Context_BatchNotSupportedForNamedStreams=Changes cannot be saved as a batch when an entity has one or more streams associated with it. Retry the SaveChanges operation without enabling the SaveChangesOptions.BatchWithSingleChangeset and the SaveChangesOptions.BatchWithIndependentOperations options.
-Context_SetSaveStreamWithoutNamedStreamEditLink=The stream named '{0}' cannot be modified because it does not have an edit-media link. Make sure that the stream name is correct and that an edit-media link for this stream is included in the entry element in the response.
-Content_EntityWithoutKey=This operation requires the entity be of an Entity Type, and has at least one key property.
-Content_EntityIsNotEntityType=This operation requires the entity to be of an Entity Type, either mark its key properties, or attribute the class with DataServiceEntityAttribute
-Context_EntityNotContained=The context is not currently tracking the entity.
-Context_EntityAlreadyContained=The context is already tracking the entity.
-Context_DifferentEntityAlreadyContained=The context is already tracking a different entity with the same resource Uri.
-Context_DidNotOriginateAsync=The current object did not originate the async result.
-Context_AsyncAlreadyDone=The asynchronous result has already been completed.
-Context_OperationCanceled=The operation has been canceled.
-Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX=The property '{0}' is not supported when MaxProtocolVersion is greater than '{1}'.
-
-Context_NoLoadWithInsertEnd=The context can not load the related collection or reference for objects in the added state.
-Context_NoRelationWithInsertEnd=One or both of the ends of the relationship is in the added state.
-Context_NoRelationWithDeleteEnd=One or both of the ends of the relationship is in the deleted state.
-Context_RelationAlreadyContained=The context is already tracking the relationship.
-Context_RelationNotRefOrCollection=The sourceProperty is not a reference or collection of the target's object type.
-Context_AddLinkCollectionOnly=AddLink and DeleteLink methods only work when the sourceProperty is a collection.
-Context_AddRelatedObjectCollectionOnly=AddRelatedObject method only works when the sourceProperty is a collection.
-Context_AddRelatedObjectSourceDeleted=AddRelatedObject method only works if the source entity is in a non-deleted state.
-Context_UpdateRelatedObjectNonCollectionOnly=UpdateRelatedObject method only works when the sourceProperty is not collection.
-Context_SetLinkReferenceOnly=SetLink method only works when the sourceProperty is not a collection.
-Context_SetRelatedObjectNonCollectionOnly=SetRelatedObject method only works when the sourceProperty is not a collection.
-Context_SetRelatedObjectSourceDeleted=SetRelatedObject method only works if the source entity is in a non-deleted state.
-Context_SetRelatedObjectLinkNonCollectionOnly=SetRelatedObjectLink method only works when the sourceProperty is not a collection.
-Context_SetRelatedObjectLinkSourceDeleted=SetRelatedObjectLink method only works if the source entity is in a non-deleted state.
-
-Context_NoContentTypeForMediaLink=Media link object of type '{0}' is configured to use the MIME type specified in the property '{1}'. However, that property's value is null or empty.
-Context_BatchNotSupportedForMediaLink=Saving entities with the [MediaEntry] attribute is not currently supported in batch mode. Use non-batched mode instead.
-Context_UnexpectedZeroRawRead=Unexpected result (<= 0) from stream.Read() while reading raw data for this property.
-Context_VersionNotSupported=Response version '{0}' is not supported. The only supported versions are: {1}.
-Context_ResponseVersionIsBiggerThanProtocolVersion=The response version is {0}, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the version required by the response, and then retry the request. If the client does not support the required protocol version, then upgrade the client.
-Context_RequestVersionIsBiggerThanProtocolVersion=The request requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the higher version, and then retry the operation.
-
-Context_ChildResourceExists=Attempt to delete a link between two objects failed because the identity of the target object of the link depends on the source object of the link.
-
-Context_ContentTypeRequiredForNamedStream=The ContentType value for a named stream cannot be null or an empty string.
-Context_EntityNotMediaLinkEntry=This operation requires that the specified entity be a Media Link Entry and that the ReadStreamUri be available. However, the specified entity either is not a Media Link Entry or does not have a valid ReadStreamUri value. If the entity is a Media Link Entry, re-query the data service for this entity to obtain a valid ReadStreamUri value.
-Context_MLEWithoutSaveStream=The entity type {0} is marked with MediaEntry attribute but no save stream was set for the entity.
-Context_SetSaveStreamOnMediaEntryProperty=Can't use SetSaveStream on entity with type {0} which has a media entry property defined.
-Context_SetSaveStreamWithoutEditMediaLink=There is no edit-media link for the entity's media stream. Make sure that the edit-media link is specified for this stream.
-Context_SetSaveStreamOnInvalidEntityState=Calling SetSaveStream on an entity with state '{0}' is not allowed.
-Context_EntityDoesNotContainNamedStream=The entity does not have a stream named '{0}'. Make sure that the name of the stream is correct.
-Context_MissingSelfAndEditLinkForNamedStream=There is no self-link or edit-media link for the stream named '{0}'. Make sure that either the self-link or edit-media link is specified for this stream.
-Context_BothLocationAndIdMustBeSpecified=The response should have both 'Location' and 'OData-EntityId' headers or the response should not have any of these headers.
-Context_BodyOperationParametersNotAllowedWithGet=OperationParameter of type BodyOperationParameter cannot be specified when the HttpMethod is set to GET.
-Context_MissingOperationParameterName=The Name property of an OperationParameter must be set to a non-null, non-empty string.
-Context_DuplicateUriOperationParameterName=Multiple uri operation parameters were found with the same name. Uri operation parameter names must be unique.
-Context_DuplicateBodyOperationParameterName=Multiple body operation parameters were found with the same name. Body operation parameter names must be unique.
-Context_NullKeysAreNotSupported=The serialized resource has a null value in key member '{0}'. Null values are not supported in key members.
-Context_ExecuteExpectsGetOrPostOrDelete=The HttpMethod must be GET, POST or DELETE.
-Context_EndExecuteExpectedVoidResponse=EndExecute overload for void service operations and actions received a non-void response from the server.
-Context_NullElementInOperationParameterArray=The operation parameters array contains a null element which is not allowed.
-Context_EntityMetadataBuilderIsRequired=An implementation of ODataEntityMetadataBuilder is required, but a null value was returned from GetEntityMetadataBuilder.
-Context_CannotChangeStateToAdded=The ChangeState method does not support the 'Added' state because additional information is needed for inserts. Use either AddObject or AddRelatedObject instead.
-Context_CannotChangeStateToModifiedIfNotUnchanged=The entity's state can only be changed to 'Modified' if it is currently 'Unchanged'.
-Context_CannotChangeStateIfAdded=An entity in the 'Added' state cannot be changed to '{0}', it can only be changed to 'Detached'.
-Context_OnMessageCreatingReturningNull=DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property must not return a null value. Please return a non-null value for this property.
-Context_SendingRequest_InvalidWhenUsingOnMessageCreating=SendingRequest cannot be used in combination with the DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property. Please use SendingRequest2 with DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property instead.
-Context_MustBeUsedWith='{0}' must be used with '{1}'.
-Context_DeepInsertOneTopLevelEntity=Deep insert can only have one top level entity.
-Context_DeepInsertDeletedOrModified=For deep insert, ChangeState for '{0}' cannot be Deleted or Modified.
-
-DataServiceClientFormat_LoadServiceModelRequired=When you call the UseJson method without a parameter, you must use the LoadServiceModel property to provide a valid IEdmModel instance.
-DataServiceClientFormat_ValidServiceModelRequiredForJson=To use the JSON format, you must first call DataServiceContext.Format.UseJson() and supply a valid service model.
-
-Collection_NullCollectionReference={0}.{1} must return a non-null open property collection.
-
-ClientType_MissingOpenProperty=The open object property '{0}:{1}' is not defined.
-Clienttype_MultipleOpenProperty={0} has multiple definitions for OpenObjectAttribute.
-ClientType_MissingProperty=The closed type {0} does not have a corresponding {1} settable property.
-ClientType_KeysMustBeSimpleTypes=The key property '{0}' on for type '{1}' is of type '{2}', which is not a simple type. Only properties of simple type can be key properties.
-ClientType_KeysOnDifferentDeclaredType={0} has key properties declared at different levels within its type hierarchy.
-ClientType_MissingMimeTypeProperty=Type '{0}' has a MimeTypeProperty attribute that references the MIME type property '{1}'. However, this type does not have a property '{1}'.
-ClientType_MissingMimeTypeDataProperty=Type '{0}' has a MimeTypeProperty attribute that references the data property '{1}'. However, this type does not have a property '{1}'.
-ClientType_MissingMediaEntryProperty=Type '{0}' has a MediaEntry attribute that references a property called '{1}'. However, this type does not have a property '{1}'.
-ClientType_NoSettableFields=The complex type '{0}' has no settable properties.
-ClientType_MultipleImplementationNotSupported=Multiple implementations of ICollection is not supported.
-ClientType_NullOpenProperties=The open type property '{0}' returned a null instance.
-ClientType_Ambiguous=Resolving type from '{0}' that inherits from '{1}' is ambiguous.
-ClientType_UnsupportedType=The type '{0}' is not supported by the client library.
-ClientType_CollectionOfCollectionNotSupported=Collection properties of a collection type are not supported.
-ClientType_MultipleTypesWithSameName=Multiple types were found with the same name '{0}'. Type names must be unique.
-
-WebUtil_TypeMismatchInCollection=An item in the collection property '{0}' is not of the correct type. All items in the collection property must be of the collection item type.
-WebUtil_TypeMismatchInNonPropertyCollection=A collection of item type '{0}' has an item which is not of the correct type. All items in the collection must be of the collection item type.
-ClientTypeCache_NonEntityTypeCannotContainEntityProperties=The property '{0}' is of entity type and it cannot be a property of the type '{1}', which is not of entity type. Only entity types can contain navigation properties.
-DataServiceException_GeneralError=An error occurred while processing this request.
-
-Deserialize_GetEnumerator=Only a single enumeration is supported by this IEnumerable.
-Deserialize_Current=The current value '{1}' type is not compatible with the expected '{0}' type.
-Deserialize_MixedTextWithComment=Error processing response stream. Element value interspersed with a comment is not supported.
-Deserialize_ExpectingSimpleValue=Error processing response stream. The XML element contains mixed content.
-Deserialize_MismatchEntryLinkLocalSimple=Error processing response stream. Payload has a link, local object has a simple value.
-Deserialize_MismatchEntryLinkFeedPropertyNotCollection=Error processing response stream. Payload has a feed and the property '{0}' is not a collection.
-Deserialize_MismatchEntryLinkEntryPropertyIsCollection=Error processing response stream. Payload has an entry and the property '{0}' is a collection.
-Deserialize_NoLocationHeader=The response to this POST request did not contain a 'location' header. That is not supported by this client.
-Deserialize_ServerException=Error processing response stream. Server failed with following message:\r\n{0}
-Deserialize_MissingIdElement=Error processing response stream. Missing id element in the response.
-
-Collection_NullCollectionNotSupported=The value of the property '{0}' is null. Properties that are a collection type of primitive or complex types cannot be null.
-Collection_NullNonPropertyCollectionNotSupported=The value of the collection of item type '{0}' is null. A collection cannot have a null value.
-Collection_NullCollectionItemsNotSupported=An item in the collection property has a null value. Collection properties that contain items with null values are not supported.
-Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed=A collection property of primitive types cannot contain an item of a collection type.
-Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed=A collection property of complex types cannot contain an item of a primitive type.
-
-EntityDescriptor_MissingSelfEditLink=The entity with identity '{0}' does not have a self-link or an edit-link associated with it. Please make sure that the entity has either a self-link or an edit-link associated with it.
-
-HttpProcessUtility_ContentTypeMissing=Content-Type header value missing.
-HttpProcessUtility_MediaTypeMissingValue=Media type is missing a parameter value.
-HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter=Media type requires a ';' character before a parameter definition.
-HttpProcessUtility_MediaTypeRequiresSlash=Media type requires a '/' character.
-HttpProcessUtility_MediaTypeRequiresSubType=Media type requires a subtype definition.
-HttpProcessUtility_MediaTypeUnspecified=Media type is unspecified.
-HttpProcessUtility_EncodingNotSupported=Character set '{0}' is not supported.
-HttpProcessUtility_EscapeCharWithoutQuotes=Value for MIME type parameter '{0}' is incorrect because it contained escape characters even though it was not quoted.
-HttpProcessUtility_EscapeCharAtEnd=Value for MIME type parameter '{0}' is incorrect because it terminated with escape character. Escape characters must always be followed by a character in a parameter value.
-HttpProcessUtility_ClosingQuoteNotFound=Value for MIME type parameter '{0}' is incorrect because the closing quote character could not be found while the parameter value started with a quote character.
-
-MaterializeFromObject_CountNotPresent=Count value is not part of the response stream.
-MaterializeFromObject_TopLevelLinkNotAvailable=The top level link is only available after the response has been enumerated.
-MaterializeFromObject_CollectionKeyNotPresentInLinkTable=The collection is not part of the current entry
-MaterializeFromObject_GetNestLinkForFlatCollection=This response does not contain any nested collections. Use null as Key instead.
-
-ODataRequestMessage_GetStreamMethodNotSupported=GetStream method is not supported.
-
-Util_EmptyString=Empty string.
-Util_EmptyArray=Empty array.
-Util_NullArrayElement=Array contains a null element.
-
-ALinq_UnsupportedExpression=The expression type {0} is not supported.
-ALinq_CouldNotConvert=Could not convert constant {0} expression to string.
-ALinq_MethodNotSupported=The method '{0}' is not supported.
-ALinq_UnaryNotSupported=The unary operator '{0}' is not supported.
-ALinq_BinaryNotSupported=The binary operator '{0}' is not supported.
-ALinq_ConstantNotSupported=The constant for '{0}' is not supported.
-ALinq_TypeBinaryNotSupported=An operation between an expression and a type is not supported.
-ALinq_ConditionalNotSupported=The conditional expression is not supported.
-ALinq_ParameterNotSupported=The parameter expression is not supported.
-ALinq_MemberAccessNotSupported=The member access of '{0}' is not supported.
-ALinq_LambdaNotSupported=Lambda Expressions not supported.
-ALinq_NewNotSupported=New Expressions not supported.
-ALinq_MemberInitNotSupported=Member Init Expressions not supported.
-ALinq_ListInitNotSupported=List Init Expressions not supported.
-ALinq_NewArrayNotSupported=New Array Expressions not supported.
-ALinq_InvocationNotSupported=Invocation Expressions not supported.
-ALinq_QueryOptionsOnlyAllowedOnLeafNodes=Can only specify query options (orderby, where, take, skip) after last navigation.
-ALinq_CantExpand=Expand query option not allowed.
-ALinq_CantCastToUnsupportedPrimitive=Can't cast to unsupported type '{0}'
-ALinq_CantNavigateWithoutKeyPredicate=Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type.
-ALinq_CanOnlyApplyOneKeyPredicate=Multiple key predicates cannot be specified for the same entity set.
-ALinq_CantTranslateExpression=The expression {0} is not supported.
-ALinq_TranslationError=Error translating Linq expression to URI: {0}
-ALinq_CantAddQueryOption=Custom query option not allowed.
-ALinq_CantAddDuplicateQueryOption=Can't add duplicate query option '{0}'.
-ALinq_CantAddAstoriaQueryOption=Can't add query option '{0}' because it would conflict with the query options from the translated Linq expression.
-ALinq_CantAddQueryOptionStartingWithDollarSign=Can't add query option '{0}' because it begins with reserved character '$'.
-ALinq_CantReferToPublicField=Referencing public field '{0}' not supported in query option expression. Use public property instead.
-ALinq_QueryOptionNotSupported=The query option '{0}' is not supported or is controlled by the OData service.
-ALinq_QueryOptionsOnlyAllowedOnSingletons=Cannot specify query options (orderby, where, take, skip, count) on single resource.
-ALinq_QueryOptionOutOfOrder=The {0} query option cannot be specified after the {1} query option.
-ALinq_CannotAddCountOption=Cannot add count option to the resource set.
-ALinq_CannotAddCountOptionConflict=Cannot add count option to the resource set because it would conflict with existing count options.
-ALinq_ProjectionOnlyAllowedOnLeafNodes=Can only specify 'select' query option after last navigation.
-ALinq_ProjectionCanOnlyHaveOneProjection=Cannot translate multiple Linq Select operations in a single 'select' query option.
-ALinq_ProjectionMemberAssignmentMismatch=Cannot initialize an instance of entity type '{0}' because '{1}' and '{2}' do not refer to the same source entity.
-ALinq_InvalidExpressionInNavigationPath=The expression '{0}' is not a valid expression for navigation path. The only supported operations inside the lambda expression body are MemberAccess and TypeAs. The expression must contain at least one MemberAccess and it cannot end with TypeAs.
-ALinq_ExpressionNotSupportedInProjectionToEntity=Initializing instances of the entity type {0} with the expression {1} is not supported.
-ALinq_ExpressionNotSupportedInProjection=Constructing or initializing instances of the type {0} with the expression {1} is not supported.
-ALinq_CannotConstructKnownEntityTypes=Construction of entity type instances must use object initializer with default constructor.
-ALinq_CannotCreateConstantEntity=Referencing of local entity type instances not supported when projecting results.
-ALinq_PropertyNamesMustMatchInProjections=Cannot assign the value from the {0} property to the {1} property. When projecting results into a entity type, the property names of the source type and the target type must match for the properties being projected.
-ALinq_CanOnlyProjectTheLeaf=Can only project the last entity type in the query being translated.
-ALinq_CannotProjectWithExplicitExpansion=Cannot create projection while there is an explicit expansion specified on the same query.
-ALinq_CollectionPropertyNotSupportedInOrderBy=The collection property '{0}' cannot be used in an 'orderby' query expression. Collection properties are not supported by the 'orderby' query option.
-ALinq_CollectionPropertyNotSupportedInWhere=The collection property '{0}' cannot be used in a 'where' query expression. Collection properties are only supported as the source of 'any' or 'all' methods in a 'where' query option.
-ALinq_CollectionMemberAccessNotSupportedInNavigation=Navigation to members of the collection property '{0}' in a 'select' query expression is not supported.
-ALinq_LinkPropertyNotSupportedInExpression=The property '{0}' of type 'DataServiceStreamLink' cannot be used in 'where' or 'orderby' query expressions. Properties of type 'DataServiceStreamLink' are not supported by these query options.
-ALinq_OfTypeArgumentNotAvailable=The target type for an OfType filter could not be determined.
-ALinq_CannotUseTypeFiltersMultipleTimes=Non-redundant type filters (OfType, C# 'as' and VB 'TryCast') can only be used once per resource set.
-ALinq_ExpressionCannotEndWithTypeAs=Unsupported expression '{0}' in '{1}' method. Expression cannot end with TypeAs.
-ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3=The expression 'TypeAs' is not supported when MaxProtocolVersion is less than '3.0'.
-ALinq_TypeAsArgumentNotEntityType=The type '{0}' is not an entity type. The target type for a TypeAs operator must be an entity type.
-ALinq_InvalidSourceForAnyAll=The source parameter for the '{0}' method has to be either a navigation or a collection property.
-ALinq_AnyAllNotSupportedInOrderBy=The method '{0}' is not supported by the 'orderby' query option.
-ALinq_FormatQueryOptionNotSupported=The '$format' query option is not supported. Use the DataServiceContext.Format property to set the desired format.
-ALinq_IllegalSystemQueryOption=Found the following illegal system token while building a projection or expansion path: '{0}'
-ALinq_IllegalPathStructure=Found a projection as a non-leaf segment in an expand path. Please rephrase your query. The projected property was : '{0}'
-ALinq_TypeTokenWithNoTrailingNavProp=Found an illegal type token '{0}' without a trailing navigation property.
-ALinq_ContainsNotValidOnEmptyCollection=The Contains method cannot be used with an empty collection.
-ALinq_AggregationMethodNotSupported=The aggregation method '{0}' is not supported.
-ALinq_InvalidAggregateExpression=The expression '{0}' is not a valid aggregate expression. The aggregate expression must evaluate to a single-valued property path to an aggregatable property.
-ALinq_InvalidGroupingExpression=The expression '{0}' is not a valid expression for grouping. The grouping expression must evaluate to a single-valued property path, i.e., a path ending in a single-valued primitive.
-ALinq_InvalidGroupByKeySelector=The expression '{0}' in the GroupBy key selector is not supported.
-
-DSKAttribute_MustSpecifyAtleastOnePropertyName=DataServiceKey attribute must specify at least one property name.
-
-DataServiceCollection_LoadRequiresTargetCollectionObserved=Target collection for the Load operation must have an associated DataServiceContext.
-DataServiceCollection_CannotStopTrackingChildCollection=The tracking of DataServiceCollection can not be stopped for child collections.
-DataServiceCollection_OperationForTrackedOnly=This operation is only supported on collections that are being tracked.
-DataServiceCollection_CannotDetermineContextFromItems=The DataServiceContext to which the DataServiceCollection instance belongs could not be determined. The DataServiceContext must either be supplied in the DataServiceCollection constructor or be used to create the DataServiceQuery or QueryOperationResponse object that is the source of the items in the DataServiceCollection.
-DataServiceCollection_InsertIntoTrackedButNotLoadedCollection=An item could not be added to the collection. When items in a DataServiceCollection are tracked by the DataServiceContext, new items cannot be added before items have been loaded into the collection.
-DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime=A previous LoadAsync operation has not yet completed. You cannot call the LoadAsync method on the DataServiceCollection again until the previous operation has completed.
-DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity=The LoadAsync method cannot be called when the DataServiceCollection is not a child collection of a related entity.
-DataServiceCollection_LoadAsyncRequiresDataServiceQuery=Only a typed DataServiceQuery object can be supplied when calling the LoadAsync method on DataServiceCollection.
-
-DataBinding_DataServiceCollectionArgumentMustHaveEntityType=The DataServiceCollection to be tracked must contain entity typed elements with at least one key property. The element type '{0}' does not have any key property.
-DataBinding_CollectionPropertySetterValueHasObserver=Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property '{0}' for entity type '{1}'.
-DataBinding_DataServiceCollectionChangedUnknownActionCollection=Unexpected action '{0}' on the OnCollectionChanged event raised by DataServiceCollection.
-DataBinding_CollectionChangedUnknownActionCollection=Unexpected action '{0}' on the OnCollectionChanged event raised by a collection object of type '{1}'.
-DataBinding_BindingOperation_DetachedSource=Add/Update/Delete operation cannot be performed on a child entity, if the parent entity is already detached.
-DataBinding_BindingOperation_ArrayItemNull=Null values are disallowed during '{0}' operations on DataServiceCollection.
-DataBinding_BindingOperation_ArrayItemNotEntity=A value provided during '{0}' operation on DataServiceCollection is not of an entity type with key.
-DataBinding_Util_UnknownEntitySetName=Entity set name has not been provided for an entity of type '{0}'.
-DataBinding_EntityAlreadyInCollection=An attempt was made to add entity of type '{0}' to a collection in which the same entity already exists.
-DataBinding_NotifyPropertyChangedNotImpl=An attempt to track an entity or complex type failed because the entity or complex type '{0}' does not implement the INotifyPropertyChanged interface.
-DataBinding_NotifyCollectionChangedNotImpl=An attempt to track an entity or complex type failed because the entity or complex type contains a collection property of type '{0}' that does not implement the INotifyCollectionChanged interface.
-DataBinding_ComplexObjectAssociatedWithMultipleEntities=An attempt to track a complex object of type '{0}' failed because the complex object is already being tracked.
-DataBinding_CollectionAssociatedWithMultipleEntities=An attempt to track a collection object of type '{0}' failed because the collection object is already being tracked.
-
-Parser_SingleEntry_NoneFound=Expected exactly one entry in the response from the server, but none was found.
-Parser_SingleEntry_MultipleFound=Expected exactly one entry in the response from the server, but more than one was found.
-Parser_SingleEntry_ExpectedFeedOrEntry=Expected a feed or entry in the response from the server, but found an unexpected element instead.
-
-Materializer_CannotAssignNull=The null value from property '{0}' cannot be assigned to a type '{1}'.
-Materializer_EntryIntoCollectionMismatch=An entry of type '{0}' cannot be added to a collection that contains instances of type '{1}'. This may occur when an existing entry of a different type has the same identity value or when the same entity is projected into two different types in a single query.
-Materializer_EntryToAccessIsNull=An entry returned by the navigation property '{0}' is null and cannot be initialized. You should check for a null value before accessing this property.
-Materializer_EntryToInitializeIsNull=An entry that contains the data required to create an instance of type '{0}' is null and cannot be initialized. You should check for a null value before accessing this entry.
-Materializer_ProjectEntityTypeMismatch=An entity of type '{0}' cannot be projected because there is already an instance of type '{1}' for '{2}'.
-Materializer_PropertyMissing=The expected property '{0}' could not be found while processing an entry. Check for null before accessing this property.
-Materializer_PropertyNotExpectedEntry=Property '{0}' is not an entity.
-Materializer_DataServiceCollectionNotSupportedForNonEntities=A DataServiceCollection can only contain entity types. Primitive and complex types cannot be contained by this kind of collection.
-Materializer_NoParameterlessCtorForCollectionProperty=Collection property '{0}' cannot be created because the type '{1}' does not have a public parameterless constructor.
-Materializer_InvalidCollectionItem=The element '{0}' is not a valid collection item. The name of the collection item element must be 'element' and must belong to the 'http://docs.oasis-open.org/odata/ns/data' namespace.
-Materializer_InvalidEntityType=There is a type mismatch between the client and the service. Type '{0}' is an entity type, but the type in the response payload does not represent an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client.
-Materializer_InvalidNonEntityType=There is a type mismatch between the client and the service. Type '{0}' is not an entity type, but the type in the response payload represents an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client.
-Materializer_CollectionExpectedCollection=Materialization of top level collection expected ICollection<>, but actual type was {0}.
-Materializer_InvalidResponsePayload=The response payload is a not a valid response payload. Please make sure that the top level element is a valid JSON element or belongs to '{0}' namespace.
-Materializer_InvalidContentTypeEncountered=The response content type '{0}' is not currently supported.
-Materializer_MaterializationTypeError=Cannot materialize the results into a collection type '{0}' because it does not have a parameterless constructor.
-Materializer_ResetAfterEnumeratorCreationError=Reset should never be called for collection reader in an internal enumerable.
-Materializer_TypeShouldBeCollectionError=Cannot materialize a collection of a primitives or complex without the type '{0}' being a collection.
-
-Serializer_LoopsNotAllowedInComplexTypes=A circular loop was detected while serializing the property '{0}'. You must make sure that loops are not present in properties that return a collection or complex type.
-Serializer_LoopsNotAllowedInNonPropertyComplexTypes=A circular loop was detected while serializing the complex type '{0}'. You must make sure that loops are not present in a collection or a complex type.
-Serializer_InvalidCollectionParameterItemType=The operation parameter named '{0}' has a collection item of Edm type kind '{1}'. A collection item must be either a primitive type or a complex Edm type kind.
-Serializer_NullCollectionParameterItemValue=The operation parameter named '{0}' has a null collection item. The items of a collection must not be null.
-Serializer_InvalidParameterType=The operation parameter named '{0}' was of Edm type kind '{1}'. An operation parameter must be either a primitive type, a complex type or a collection of primitive or complex types.
-Serializer_UriDoesNotContainParameterAlias=The parameter alias '{0}' was not present in the request URI. All parameters passed as alias must be present in the request URI.
-Serializer_InvalidEnumMemberValue=The enum type '{0}' has no member named '{1}'.
-
-; NOTE: error message copied from Silverlight because the portable library requires this
-DataServiceQuery_EnumerationNotSupported=This target framework does not enable you to directly enumerate over a data service query. This is because enumeration automatically sends a synchronous request to the data service. Because this framework only supports asynchronous operations, you must instead call the BeginExecute and EndExecute methods to obtain a query result that supports enumeration.
-
-; NOTE: Moved over to common as this is used in the portable library
-Context_SendingRequestEventArgsNotHttp=Only instances of HttpWebRequest are currently allowed for this property. Other subtypes of WebRequest are not supported.
-
-; NOTE: these error messages are copied from ODL because they appear in shared source files.
-General_InternalError=An internal error '{0}' occurred.
-
-ODataMetadataBuilder_MissingEntitySetUri=The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required.
-ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix=The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments.
-ODataMetadataBuilder_MissingEntityInstanceUri=Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required.
-
-EdmValueUtils_UnsupportedPrimitiveType=The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type.
-EdmValueUtils_IncorrectPrimitiveTypeKind=Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'.
-EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName=Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'.
-EdmValueUtils_CannotConvertTypeToClrValue=A value with primitive kind '{0}' cannot be converted into a primitive object value.
-
-; NOTE: these error messages are copied from EdmLib because they appear in shared source files.
-ValueParser_InvalidDuration=The value '{0}' is not a valid duration value.
-
-; Note: The below list of error messages are common to the ODataLib, EdmLib, Spatial, Server and Client projects.
-PlatformHelper_DateTimeOffsetMustContainTimeZone=The time zone information is missing on the DateTimeOffset value '{0}'. A DateTimeOffset value must contain the time zone information.
-;END
-
-; NOTE: don't use \", use ' instead
-; NOTE: don't use #, use ; instead for comments
-; NOTE: leave the [strings] alone
-
-; See ResourceManager documentation and the ResGen tool.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error Messages
-
-DataServiceRequest_FailGetCount=Failed to get the count value from the server.
-DataServiceRequest_FailGetValue=Failed to get the value from the server.
-
-Context_ExecuteExpectedVoidResponse=Execute overload for void service operations and actions received a non-void response from the server.
-;END
diff --git a/src/Microsoft.OData.Client/ObjectMaterializer.cs b/src/Microsoft.OData.Client/ObjectMaterializer.cs
index d8ddbdd4ad..70aa5e6f3b 100644
--- a/src/Microsoft.OData.Client/ObjectMaterializer.cs
+++ b/src/Microsoft.OData.Client/ObjectMaterializer.cs
@@ -429,7 +429,7 @@ internal virtual DataServiceQueryContinuation GetContinuation(IEnumerable key)
{
// expectingSingleValue && !moved : haven't started parsing single value (single value should not have next link anyway)
// !expectingSingleValue && !IsEndOfStream : collection type feed did not finish parsing yet
- throw new InvalidOperationException(Strings.MaterializeFromObject_TopLevelLinkNotAvailable);
+ throw new InvalidOperationException(SRResources.MaterializeFromObject_TopLevelLinkNotAvailable);
}
// we have already moved to the end of stream
@@ -451,7 +451,7 @@ internal virtual DataServiceQueryContinuation GetContinuation(IEnumerable key)
if (!this.materializer.NextLinkTable.TryGetValue(key, out result))
{
// someone has asked for a collection that's "out of scope" or doesn't exist
- throw new ArgumentException(Strings.MaterializeFromObject_CollectionKeyNotPresentInLinkTable);
+ throw new ArgumentException(SRResources.MaterializeFromObject_CollectionKeyNotPresentInLinkTable);
}
}
@@ -463,7 +463,7 @@ private void CheckGetEnumerator()
{
if (this.calledGetEnumerator)
{
- throw Error.NotSupported(Strings.Deserialize_GetEnumerator);
+ throw Error.NotSupported(SRResources.Deserialize_GetEnumerator);
}
this.calledGetEnumerator = true;
@@ -495,7 +495,7 @@ internal static string ReadElementString(XmlReader reader, bool checkNullAttribu
case XmlNodeType.SignificantWhitespace:
if (result != null)
{
- throw Error.InvalidOperation(Strings.Deserialize_MixedTextWithComment);
+ throw Error.InvalidOperation(SRResources.Deserialize_MixedTextWithComment);
}
result = reader.Value;
@@ -509,13 +509,13 @@ internal static string ReadElementString(XmlReader reader, bool checkNullAttribu
goto default;
default:
- throw Error.InvalidOperation(Strings.Deserialize_ExpectingSimpleValue);
+ throw Error.InvalidOperation(SRResources.Deserialize_ExpectingSimpleValue);
#endregion
}
}
// xml ended before EndElement?
- throw Error.InvalidOperation(Strings.Deserialize_ExpectingSimpleValue);
+ throw Error.InvalidOperation(SRResources.Deserialize_ExpectingSimpleValue);
}
///
@@ -573,7 +573,7 @@ internal override DataServiceQueryContinuation GetContinuation(IEnumerable key)
}
else
{
- throw new InvalidOperationException(Strings.MaterializeFromObject_GetNestLinkForFlatCollection);
+ throw new InvalidOperationException(SRResources.MaterializeFromObject_GetNestLinkForFlatCollection);
}
}
diff --git a/src/Microsoft.OData.Client/OperationParameter.cs b/src/Microsoft.OData.Client/OperationParameter.cs
index 6c92af3276..b8c9ade028 100644
--- a/src/Microsoft.OData.Client/OperationParameter.cs
+++ b/src/Microsoft.OData.Client/OperationParameter.cs
@@ -24,7 +24,7 @@ protected OperationParameter(string name, Object value)
{
if (string.IsNullOrEmpty(name))
{
- throw new ArgumentException(Strings.Context_MissingOperationParameterName);
+ throw new ArgumentException(SRResources.Context_MissingOperationParameterName);
}
this.parameterName = name;
diff --git a/src/Microsoft.OData.Client/Parameterized.Microsoft.OData.Client.cs b/src/Microsoft.OData.Client/Parameterized.Microsoft.OData.Client.cs
deleted file mode 100644
index 316bec8466..0000000000
--- a/src/Microsoft.OData.Client/Parameterized.Microsoft.OData.Client.cs
+++ /dev/null
@@ -1,2528 +0,0 @@
-//
-
-//---------------------------------------------------------------------
-//
-// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
-//
-// GENERATED FILE. DO NOT MODIFY.
-//
-//
-//---------------------------------------------------------------------
-
-namespace Microsoft.OData.Client {
- using System;
- using System.Resources;
-
- ///
- /// Strongly-typed and parameterized string resources.
- ///
- internal static class Strings {
- ///
- /// A string like "The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "{0}"."
- ///
- internal static string Batch_ExpectedContentType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Batch_ExpectedContentType, p0);
- }
-
- ///
- /// A string like "The POST request expected a response with content. ID={0}"
- ///
- internal static string Batch_ExpectedResponse(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Batch_ExpectedResponse, p0);
- }
-
- ///
- /// A string like "Not all requests in the batch had a response."
- ///
- internal static string Batch_IncompleteResponseCount
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Batch_IncompleteResponseCount);
- }
- }
-
- ///
- /// A string like "The web response contained unexpected sections. ID={0}"
- ///
- internal static string Batch_UnexpectedContent(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Batch_UnexpectedContent, p0);
- }
-
- ///
- /// A string like "Expected an absolute, well formed http URL without a query or fragment."
- ///
- internal static string Context_BaseUri
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BaseUri);
- }
- }
-
- ///
- /// A string like "You must set the BaseUri property before you perform this operation."
- ///
- internal static string Context_BaseUriRequired
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BaseUriRequired);
- }
- }
-
- ///
- /// A string like "The Uri that is returned by the ResolveEntitySet function must be an absolute, well-formed URL with an "http" or "https" scheme name and without any query strings or fragment identifiers."
- ///
- internal static string Context_ResolveReturnedInvalidUri
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ResolveReturnedInvalidUri);
- }
- }
-
- ///
- /// A string like "Because the requestUri is a relative Uri, you must set the BaseUri property on the DataServiceContext."
- ///
- internal static string Context_RequestUriIsRelativeBaseUriRequired
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_RequestUriIsRelativeBaseUriRequired);
- }
- }
-
- ///
- /// A string like "The ResolveEntitySet function must return a non-null Uri for the EntitySet '{0}', otherwise you must set the BaseUri property."
- ///
- internal static string Context_ResolveEntitySetOrBaseUriRequired(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ResolveEntitySetOrBaseUriRequired, p0);
- }
-
- ///
- /// A string like "Unable to convert value '{0}' into a key string for a URI."
- ///
- internal static string Context_CannotConvertKey(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_CannotConvertKey, p0);
- }
-
- ///
- /// A string like "The identity value specified by either the OData-EntityId header must be an absolute URI."
- ///
- internal static string Context_TrackingExpectsAbsoluteUri
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_TrackingExpectsAbsoluteUri);
- }
- }
-
- ///
- /// A string like "The 'Location' header value specified in the response must be an absolute URI."
- ///
- internal static string Context_LocationHeaderExpectsAbsoluteUri
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_LocationHeaderExpectsAbsoluteUri);
- }
- }
-
- ///
- /// A string like "One of the link's resources failed to insert."
- ///
- internal static string Context_LinkResourceInsertFailure
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_LinkResourceInsertFailure);
- }
- }
-
- ///
- /// A string like "Microsoft.OData.Client internal error {0}."
- ///
- internal static string Context_InternalError(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_InternalError, p0);
- }
-
- ///
- /// A string like "An error occurred for this query during batch execution. See the inner exception for details."
- ///
- internal static string Context_BatchExecuteError
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BatchExecuteError);
- }
- }
-
- ///
- /// A string like "Expected a relative URL path without query or fragment."
- ///
- internal static string Context_EntitySetName
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntitySetName);
- }
- }
-
- ///
- /// A string like "Changes cannot be saved as a batch when an entity has one or more streams associated with it. Retry the SaveChanges operation without enabling the SaveChangesOptions.BatchWithSingleChangeset and the SaveChangesOptions.BatchWithIndependentOperations options."
- ///
- internal static string Context_BatchNotSupportedForNamedStreams
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BatchNotSupportedForNamedStreams);
- }
- }
-
- ///
- /// A string like "The stream named '{0}' cannot be modified because it does not have an edit-media link. Make sure that the stream name is correct and that an edit-media link for this stream is included in the entry element in the response."
- ///
- internal static string Context_SetSaveStreamWithoutNamedStreamEditLink(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetSaveStreamWithoutNamedStreamEditLink, p0);
- }
-
- ///
- /// A string like "This operation requires the entity be of an Entity Type, and has at least one key property."
- ///
- internal static string Content_EntityWithoutKey
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Content_EntityWithoutKey);
- }
- }
-
- ///
- /// A string like "This operation requires the entity to be of an Entity Type, either mark its key properties, or attribute the class with DataServiceEntityAttribute"
- ///
- internal static string Content_EntityIsNotEntityType
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Content_EntityIsNotEntityType);
- }
- }
-
- ///
- /// A string like "The context is not currently tracking the entity."
- ///
- internal static string Context_EntityNotContained
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityNotContained);
- }
- }
-
- ///
- /// A string like "The context is already tracking the entity."
- ///
- internal static string Context_EntityAlreadyContained
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityAlreadyContained);
- }
- }
-
- ///
- /// A string like "The context is already tracking a different entity with the same resource Uri."
- ///
- internal static string Context_DifferentEntityAlreadyContained
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_DifferentEntityAlreadyContained);
- }
- }
-
- ///
- /// A string like "The current object did not originate the async result."
- ///
- internal static string Context_DidNotOriginateAsync
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_DidNotOriginateAsync);
- }
- }
-
- ///
- /// A string like "The asynchronous result has already been completed."
- ///
- internal static string Context_AsyncAlreadyDone
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_AsyncAlreadyDone);
- }
- }
-
- ///
- /// A string like "The operation has been canceled."
- ///
- internal static string Context_OperationCanceled
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_OperationCanceled);
- }
- }
-
- ///
- /// A string like "The property '{0}' is not supported when MaxProtocolVersion is greater than '{1}'."
- ///
- internal static string Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX, p0, p1);
- }
-
- ///
- /// A string like "The context can not load the related collection or reference for objects in the added state."
- ///
- internal static string Context_NoLoadWithInsertEnd
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_NoLoadWithInsertEnd);
- }
- }
-
- ///
- /// A string like "One or both of the ends of the relationship is in the added state."
- ///
- internal static string Context_NoRelationWithInsertEnd
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_NoRelationWithInsertEnd);
- }
- }
-
- ///
- /// A string like "One or both of the ends of the relationship is in the deleted state."
- ///
- internal static string Context_NoRelationWithDeleteEnd
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_NoRelationWithDeleteEnd);
- }
- }
-
- ///
- /// A string like "The context is already tracking the relationship."
- ///
- internal static string Context_RelationAlreadyContained
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_RelationAlreadyContained);
- }
- }
-
- ///
- /// A string like "The sourceProperty is not a reference or collection of the target's object type."
- ///
- internal static string Context_RelationNotRefOrCollection
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_RelationNotRefOrCollection);
- }
- }
-
- ///
- /// A string like "AddLink and DeleteLink methods only work when the sourceProperty is a collection."
- ///
- internal static string Context_AddLinkCollectionOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_AddLinkCollectionOnly);
- }
- }
-
- ///
- /// A string like "AddRelatedObject method only works when the sourceProperty is a collection."
- ///
- internal static string Context_AddRelatedObjectCollectionOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_AddRelatedObjectCollectionOnly);
- }
- }
-
- ///
- /// A string like "AddRelatedObject method only works if the source entity is in a non-deleted state."
- ///
- internal static string Context_AddRelatedObjectSourceDeleted
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_AddRelatedObjectSourceDeleted);
- }
- }
-
- ///
- /// A string like "UpdateRelatedObject method only works when the sourceProperty is not collection."
- ///
- internal static string Context_UpdateRelatedObjectNonCollectionOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_UpdateRelatedObjectNonCollectionOnly);
- }
- }
-
- ///
- /// A string like "SetLink method only works when the sourceProperty is not a collection."
- ///
- internal static string Context_SetLinkReferenceOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetLinkReferenceOnly);
- }
- }
-
- ///
- /// A string like "SetRelatedObject method only works when the sourceProperty is not a collection."
- ///
- internal static string Context_SetRelatedObjectNonCollectionOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetRelatedObjectNonCollectionOnly);
- }
- }
-
- ///
- /// A string like "SetRelatedObject method only works if the source entity is in a non-deleted state."
- ///
- internal static string Context_SetRelatedObjectSourceDeleted
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetRelatedObjectSourceDeleted);
- }
- }
-
- ///
- /// A string like "SetRelatedObjectLink method only works when the sourceProperty is not a collection."
- ///
- internal static string Context_SetRelatedObjectLinkNonCollectionOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetRelatedObjectLinkNonCollectionOnly);
- }
- }
-
- ///
- /// A string like "SetRelatedObjectLink method only works if the source entity is in a non-deleted state."
- ///
- internal static string Context_SetRelatedObjectLinkSourceDeleted
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetRelatedObjectLinkSourceDeleted);
- }
- }
-
- ///
- /// A string like "Media link object of type '{0}' is configured to use the MIME type specified in the property '{1}'. However, that property's value is null or empty."
- ///
- internal static string Context_NoContentTypeForMediaLink(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_NoContentTypeForMediaLink, p0, p1);
- }
-
- ///
- /// A string like "Saving entities with the [MediaEntry] attribute is not currently supported in batch mode. Use non-batched mode instead."
- ///
- internal static string Context_BatchNotSupportedForMediaLink
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BatchNotSupportedForMediaLink);
- }
- }
-
- ///
- /// A string like "Unexpected result (<= 0) from stream.Read() while reading raw data for this property."
- ///
- internal static string Context_UnexpectedZeroRawRead
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_UnexpectedZeroRawRead);
- }
- }
-
- ///
- /// A string like "Response version '{0}' is not supported. The only supported versions are: {1}."
- ///
- internal static string Context_VersionNotSupported(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_VersionNotSupported, p0, p1);
- }
-
- ///
- /// A string like "The response version is {0}, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the version required by the response, and then retry the request. If the client does not support the required protocol version, then upgrade the client."
- ///
- internal static string Context_ResponseVersionIsBiggerThanProtocolVersion(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ResponseVersionIsBiggerThanProtocolVersion, p0, p1);
- }
-
- ///
- /// A string like "The request requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the higher version, and then retry the operation."
- ///
- internal static string Context_RequestVersionIsBiggerThanProtocolVersion(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_RequestVersionIsBiggerThanProtocolVersion, p0, p1);
- }
-
- ///
- /// A string like "Attempt to delete a link between two objects failed because the identity of the target object of the link depends on the source object of the link."
- ///
- internal static string Context_ChildResourceExists
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ChildResourceExists);
- }
- }
-
- ///
- /// A string like "The ContentType value for a named stream cannot be null or an empty string."
- ///
- internal static string Context_ContentTypeRequiredForNamedStream
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ContentTypeRequiredForNamedStream);
- }
- }
-
- ///
- /// A string like "This operation requires that the specified entity be a Media Link Entry and that the ReadStreamUri be available. However, the specified entity either is not a Media Link Entry or does not have a valid ReadStreamUri value. If the entity is a Media Link Entry, re-query the data service for this entity to obtain a valid ReadStreamUri value."
- ///
- internal static string Context_EntityNotMediaLinkEntry
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityNotMediaLinkEntry);
- }
- }
-
- ///
- /// A string like "The entity type {0} is marked with MediaEntry attribute but no save stream was set for the entity."
- ///
- internal static string Context_MLEWithoutSaveStream(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_MLEWithoutSaveStream, p0);
- }
-
- ///
- /// A string like "Can't use SetSaveStream on entity with type {0} which has a media entry property defined."
- ///
- internal static string Context_SetSaveStreamOnMediaEntryProperty(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetSaveStreamOnMediaEntryProperty, p0);
- }
-
- ///
- /// A string like "There is no edit-media link for the entity's media stream. Make sure that the edit-media link is specified for this stream."
- ///
- internal static string Context_SetSaveStreamWithoutEditMediaLink
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetSaveStreamWithoutEditMediaLink);
- }
- }
-
- ///
- /// A string like "Calling SetSaveStream on an entity with state '{0}' is not allowed."
- ///
- internal static string Context_SetSaveStreamOnInvalidEntityState(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SetSaveStreamOnInvalidEntityState, p0);
- }
-
- ///
- /// A string like "The entity does not have a stream named '{0}'. Make sure that the name of the stream is correct."
- ///
- internal static string Context_EntityDoesNotContainNamedStream(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityDoesNotContainNamedStream, p0);
- }
-
- ///
- /// A string like "There is no self-link or edit-media link for the stream named '{0}'. Make sure that either the self-link or edit-media link is specified for this stream."
- ///
- internal static string Context_MissingSelfAndEditLinkForNamedStream(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_MissingSelfAndEditLinkForNamedStream, p0);
- }
-
- ///
- /// A string like "The response should have both 'Location' and 'OData-EntityId' headers or the response should not have any of these headers."
- ///
- internal static string Context_BothLocationAndIdMustBeSpecified
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BothLocationAndIdMustBeSpecified);
- }
- }
-
- ///
- /// A string like "OperationParameter of type BodyOperationParameter cannot be specified when the HttpMethod is set to GET."
- ///
- internal static string Context_BodyOperationParametersNotAllowedWithGet
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_BodyOperationParametersNotAllowedWithGet);
- }
- }
-
- ///
- /// A string like "The Name property of an OperationParameter must be set to a non-null, non-empty string."
- ///
- internal static string Context_MissingOperationParameterName
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_MissingOperationParameterName);
- }
- }
-
- ///
- /// A string like "Multiple uri operation parameters were found with the same name. Uri operation parameter names must be unique."
- ///
- internal static string Context_DuplicateUriOperationParameterName
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_DuplicateUriOperationParameterName);
- }
- }
-
- ///
- /// A string like "Multiple body operation parameters were found with the same name. Body operation parameter names must be unique."
- ///
- internal static string Context_DuplicateBodyOperationParameterName
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_DuplicateBodyOperationParameterName);
- }
- }
-
- ///
- /// A string like "The serialized resource has a null value in key member '{0}'. Null values are not supported in key members."
- ///
- internal static string Context_NullKeysAreNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_NullKeysAreNotSupported, p0);
- }
-
- ///
- /// A string like "The HttpMethod must be GET, POST or DELETE."
- ///
- internal static string Context_ExecuteExpectsGetOrPostOrDelete
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ExecuteExpectsGetOrPostOrDelete);
- }
- }
-
- ///
- /// A string like "EndExecute overload for void service operations and actions received a non-void response from the server."
- ///
- internal static string Context_EndExecuteExpectedVoidResponse
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EndExecuteExpectedVoidResponse);
- }
- }
-
- ///
- /// A string like "The operation parameters array contains a null element which is not allowed."
- ///
- internal static string Context_NullElementInOperationParameterArray
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_NullElementInOperationParameterArray);
- }
- }
-
- ///
- /// A string like "An implementation of ODataEntityMetadataBuilder is required, but a null value was returned from GetEntityMetadataBuilder."
- ///
- internal static string Context_EntityMetadataBuilderIsRequired
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityMetadataBuilderIsRequired);
- }
- }
-
- ///
- /// A string like "The ChangeState method does not support the 'Added' state because additional information is needed for inserts. Use either AddObject or AddRelatedObject instead."
- ///
- internal static string Context_CannotChangeStateToAdded
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_CannotChangeStateToAdded);
- }
- }
-
- ///
- /// A string like "The entity's state can only be changed to 'Modified' if it is currently 'Unchanged'."
- ///
- internal static string Context_CannotChangeStateToModifiedIfNotUnchanged
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_CannotChangeStateToModifiedIfNotUnchanged);
- }
- }
-
- ///
- /// A string like "An entity in the 'Added' state cannot be changed to '{0}', it can only be changed to 'Detached'."
- ///
- internal static string Context_CannotChangeStateIfAdded(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_CannotChangeStateIfAdded, p0);
- }
-
- ///
- /// A string like "DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property must not return a null value. Please return a non-null value for this property."
- ///
- internal static string Context_OnMessageCreatingReturningNull
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_OnMessageCreatingReturningNull);
- }
- }
-
- ///
- /// A string like "SendingRequest cannot be used in combination with the DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property. Please use SendingRequest2 with DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property instead."
- ///
- internal static string Context_SendingRequest_InvalidWhenUsingOnMessageCreating
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SendingRequest_InvalidWhenUsingOnMessageCreating);
- }
- }
-
- ///
- /// A string like "'{0}' must be used with '{1}'."
- ///
- internal static string Context_MustBeUsedWith(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_MustBeUsedWith, p0, p1);
- }
-
- ///
- /// A string like "The context is currently in no tracking mode, in order to use streams make sure your entities extend BaseEntityType and query the Item again from the server to populate the read link or enable tracking."
- ///
- internal static string Context_EntityMediaLinksNotTrackedInEntity
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityMediaLinksNotTrackedInEntity);
- }
- }
-
- ///
- /// A string like "The context is in non tracking mode, The entity does not seem to have the media links populated properly. Please verify server response is correct and that the entity extends BaseEntityType."
- ///
- internal static string Context_EntityInNonTrackedContextLacksMediaLinks
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_EntityInNonTrackedContextLacksMediaLinks);
- }
- }
-
- ///
- /// A string like "Deep insert can only have one top level entity."
- ///
- internal static string Context_DeepInsertOneTopLevelEntity
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_DeepInsertOneTopLevelEntity);
- }
- }
-
- ///
- /// A string like "For deep insert, ChangeState for '{0}' cannot be Deleted or Modified."
- ///
- internal static string Context_DeepInsertDeletedOrModified(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_DeepInsertDeletedOrModified, p0);
- }
-
- ///
- /// A string like "When you call the UseJson method without a parameter, you must use the LoadServiceModel property to provide a valid IEdmModel instance."
- ///
- internal static string DataServiceClientFormat_LoadServiceModelRequired
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceClientFormat_LoadServiceModelRequired);
- }
- }
-
- ///
- /// A string like "To use the JSON format, you must first call DataServiceContext.Format.UseJson() and supply a valid service model."
- ///
- internal static string DataServiceClientFormat_ValidServiceModelRequiredForJson
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceClientFormat_ValidServiceModelRequiredForJson);
- }
- }
-
- ///
- /// A string like "{0}.{1} must return a non-null open property collection."
- ///
- internal static string Collection_NullCollectionReference(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Collection_NullCollectionReference, p0, p1);
- }
-
- ///
- /// A string like "The open object property '{0}:{1}' is not defined."
- ///
- internal static string ClientType_MissingOpenProperty(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MissingOpenProperty, p0, p1);
- }
-
- ///
- /// A string like "{0} has multiple definitions for OpenObjectAttribute."
- ///
- internal static string Clienttype_MultipleOpenProperty(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Clienttype_MultipleOpenProperty, p0);
- }
-
- ///
- /// A string like "The closed type {0} does not have a corresponding {1} settable property."
- ///
- internal static string ClientType_MissingProperty(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MissingProperty, p0, p1);
- }
-
- ///
- /// A string like "The key property '{0}' on for type '{1}' is of type '{2}', which is not a simple type. Only properties of simple type can be key properties."
- ///
- internal static string ClientType_KeysMustBeSimpleTypes(object p0, object p1, object p2)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_KeysMustBeSimpleTypes, p0, p1, p2);
- }
-
- ///
- /// A string like "{0} has key properties declared at different levels within its type hierarchy."
- ///
- internal static string ClientType_KeysOnDifferentDeclaredType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_KeysOnDifferentDeclaredType, p0);
- }
-
- ///
- /// A string like "Type '{0}' has a MimeTypeProperty attribute that references the MIME type property '{1}'. However, this type does not have a property '{1}'."
- ///
- internal static string ClientType_MissingMimeTypeProperty(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MissingMimeTypeProperty, p0, p1);
- }
-
- ///
- /// A string like "Type '{0}' has a MimeTypeProperty attribute that references the data property '{1}'. However, this type does not have a property '{1}'."
- ///
- internal static string ClientType_MissingMimeTypeDataProperty(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MissingMimeTypeDataProperty, p0, p1);
- }
-
- ///
- /// A string like "Type '{0}' has a MediaEntry attribute that references a property called '{1}'. However, this type does not have a property '{1}'."
- ///
- internal static string ClientType_MissingMediaEntryProperty(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MissingMediaEntryProperty, p0, p1);
- }
-
- ///
- /// A string like "The complex type '{0}' has no settable properties."
- ///
- internal static string ClientType_NoSettableFields(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_NoSettableFields, p0);
- }
-
- ///
- /// A string like "Multiple implementations of ICollection<T> is not supported."
- ///
- internal static string ClientType_MultipleImplementationNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MultipleImplementationNotSupported);
- }
- }
-
- ///
- /// A string like "The open type property '{0}' returned a null instance."
- ///
- internal static string ClientType_NullOpenProperties(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_NullOpenProperties, p0);
- }
-
- ///
- /// A string like "Resolving type from '{0}' that inherits from '{1}' is ambiguous."
- ///
- internal static string ClientType_Ambiguous(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_Ambiguous, p0, p1);
- }
-
- ///
- /// A string like "The type '{0}' is not supported by the client library."
- ///
- internal static string ClientType_UnsupportedType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_UnsupportedType, p0);
- }
-
- ///
- /// A string like "Collection properties of a collection type are not supported."
- ///
- internal static string ClientType_CollectionOfCollectionNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_CollectionOfCollectionNotSupported);
- }
- }
-
- ///
- /// A string like "Multiple types were found with the same name '{0}'. Type names must be unique."
- ///
- internal static string ClientType_MultipleTypesWithSameName(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientType_MultipleTypesWithSameName, p0);
- }
-
- ///
- /// A string like "An item in the collection property '{0}' is not of the correct type. All items in the collection property must be of the collection item type."
- ///
- internal static string WebUtil_TypeMismatchInCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.WebUtil_TypeMismatchInCollection, p0);
- }
-
- ///
- /// A string like "A collection of item type '{0}' has an item which is not of the correct type. All items in the collection must be of the collection item type."
- ///
- internal static string WebUtil_TypeMismatchInNonPropertyCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.WebUtil_TypeMismatchInNonPropertyCollection, p0);
- }
-
- ///
- /// A string like "The property '{0}' is of entity type and it cannot be a property of the type '{1}', which is not of entity type. Only entity types can contain navigation properties."
- ///
- internal static string ClientTypeCache_NonEntityTypeCannotContainEntityProperties(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ClientTypeCache_NonEntityTypeCannotContainEntityProperties, p0, p1);
- }
-
- ///
- /// A string like "An error occurred while processing this request."
- ///
- internal static string DataServiceException_GeneralError
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceException_GeneralError);
- }
- }
-
- ///
- /// A string like "Only a single enumeration is supported by this IEnumerable."
- ///
- internal static string Deserialize_GetEnumerator
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_GetEnumerator);
- }
- }
-
- ///
- /// A string like "The current value '{1}' type is not compatible with the expected '{0}' type."
- ///
- internal static string Deserialize_Current(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_Current, p0, p1);
- }
-
- ///
- /// A string like "Error processing response stream. Element value interspersed with a comment is not supported."
- ///
- internal static string Deserialize_MixedTextWithComment
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_MixedTextWithComment);
- }
- }
-
- ///
- /// A string like "Error processing response stream. The XML element contains mixed content."
- ///
- internal static string Deserialize_ExpectingSimpleValue
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_ExpectingSimpleValue);
- }
- }
-
- ///
- /// A string like "Error processing response stream. Payload has a link, local object has a simple value."
- ///
- internal static string Deserialize_MismatchEntryLinkLocalSimple
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_MismatchEntryLinkLocalSimple);
- }
- }
-
- ///
- /// A string like "Error processing response stream. Payload has a feed and the property '{0}' is not a collection."
- ///
- internal static string Deserialize_MismatchEntryLinkFeedPropertyNotCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_MismatchEntryLinkFeedPropertyNotCollection, p0);
- }
-
- ///
- /// A string like "Error processing response stream. Payload has an entry and the property '{0}' is a collection."
- ///
- internal static string Deserialize_MismatchEntryLinkEntryPropertyIsCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_MismatchEntryLinkEntryPropertyIsCollection, p0);
- }
-
- ///
- /// A string like "The response to this POST request did not contain a 'location' header. That is not supported by this client."
- ///
- internal static string Deserialize_NoLocationHeader
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_NoLocationHeader);
- }
- }
-
- ///
- /// A string like "Error processing response stream. Server failed with following message:\r\n{0}"
- ///
- internal static string Deserialize_ServerException(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_ServerException, p0);
- }
-
- ///
- /// A string like "Error processing response stream. Missing id element in the response."
- ///
- internal static string Deserialize_MissingIdElement
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Deserialize_MissingIdElement);
- }
- }
-
- ///
- /// A string like "The value of the property '{0}' is null. Properties that are a collection type of primitive or complex types cannot be null."
- ///
- internal static string Collection_NullCollectionNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Collection_NullCollectionNotSupported, p0);
- }
-
- ///
- /// A string like "The value of the collection of item type '{0}' is null. A collection cannot have a null value."
- ///
- internal static string Collection_NullNonPropertyCollectionNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Collection_NullNonPropertyCollectionNotSupported, p0);
- }
-
- ///
- /// A string like "An item in the collection property has a null value. Collection properties that contain items with null values are not supported."
- ///
- internal static string Collection_NullCollectionItemsNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Collection_NullCollectionItemsNotSupported);
- }
- }
-
- ///
- /// A string like "A collection property of primitive types cannot contain an item of a collection type."
- ///
- internal static string Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed);
- }
- }
-
- ///
- /// A string like "A collection property of complex types cannot contain an item of a primitive type."
- ///
- internal static string Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed);
- }
- }
-
- ///
- /// A string like "The entity with identity '{0}' does not have a self-link or an edit-link associated with it. Please make sure that the entity has either a self-link or an edit-link associated with it."
- ///
- internal static string EntityDescriptor_MissingSelfEditLink(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.EntityDescriptor_MissingSelfEditLink, p0);
- }
-
- ///
- /// A string like "Content-Type header value missing."
- ///
- internal static string HttpProcessUtility_ContentTypeMissing
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_ContentTypeMissing);
- }
- }
-
- ///
- /// A string like "Media type is missing a parameter value."
- ///
- internal static string HttpProcessUtility_MediaTypeMissingValue
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_MediaTypeMissingValue);
- }
- }
-
- ///
- /// A string like "Media type requires a ';' character before a parameter definition."
- ///
- internal static string HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter);
- }
- }
-
- ///
- /// A string like "Media type requires a '/' character."
- ///
- internal static string HttpProcessUtility_MediaTypeRequiresSlash
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_MediaTypeRequiresSlash);
- }
- }
-
- ///
- /// A string like "Media type requires a subtype definition."
- ///
- internal static string HttpProcessUtility_MediaTypeRequiresSubType
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_MediaTypeRequiresSubType);
- }
- }
-
- ///
- /// A string like "Media type is unspecified."
- ///
- internal static string HttpProcessUtility_MediaTypeUnspecified
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_MediaTypeUnspecified);
- }
- }
-
- ///
- /// A string like "Character set '{0}' is not supported."
- ///
- internal static string HttpProcessUtility_EncodingNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_EncodingNotSupported, p0);
- }
-
- ///
- /// A string like "Value for MIME type parameter '{0}' is incorrect because it contained escape characters even though it was not quoted."
- ///
- internal static string HttpProcessUtility_EscapeCharWithoutQuotes(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_EscapeCharWithoutQuotes, p0);
- }
-
- ///
- /// A string like "Value for MIME type parameter '{0}' is incorrect because it terminated with escape character. Escape characters must always be followed by a character in a parameter value."
- ///
- internal static string HttpProcessUtility_EscapeCharAtEnd(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_EscapeCharAtEnd, p0);
- }
-
- ///
- /// A string like "Value for MIME type parameter '{0}' is incorrect because the closing quote character could not be found while the parameter value started with a quote character."
- ///
- internal static string HttpProcessUtility_ClosingQuoteNotFound(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.HttpProcessUtility_ClosingQuoteNotFound, p0);
- }
-
- ///
- /// A string like "Count value is not part of the response stream."
- ///
- internal static string MaterializeFromObject_CountNotPresent
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.MaterializeFromObject_CountNotPresent);
- }
- }
-
- ///
- /// A string like "The top level link is only available after the response has been enumerated."
- ///
- internal static string MaterializeFromObject_TopLevelLinkNotAvailable
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.MaterializeFromObject_TopLevelLinkNotAvailable);
- }
- }
-
- ///
- /// A string like "The collection is not part of the current entry"
- ///
- internal static string MaterializeFromObject_CollectionKeyNotPresentInLinkTable
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.MaterializeFromObject_CollectionKeyNotPresentInLinkTable);
- }
- }
-
- ///
- /// A string like "This response does not contain any nested collections. Use null as Key instead."
- ///
- internal static string MaterializeFromObject_GetNestLinkForFlatCollection
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.MaterializeFromObject_GetNestLinkForFlatCollection);
- }
- }
-
- ///
- /// A string like "GetStream method is not supported."
- ///
- internal static string ODataRequestMessage_GetStreamMethodNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ODataRequestMessage_GetStreamMethodNotSupported);
- }
- }
-
- ///
- /// A string like "Empty string."
- ///
- internal static string Util_EmptyString
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Util_EmptyString);
- }
- }
-
- ///
- /// A string like "Empty array."
- ///
- internal static string Util_EmptyArray
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Util_EmptyArray);
- }
- }
-
- ///
- /// A string like "Array contains a null element."
- ///
- internal static string Util_NullArrayElement
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Util_NullArrayElement);
- }
- }
-
- ///
- /// A string like "The expression type {0} is not supported."
- ///
- internal static string ALinq_UnsupportedExpression(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_UnsupportedExpression, p0);
- }
-
- ///
- /// A string like "Could not convert constant {0} expression to string."
- ///
- internal static string ALinq_CouldNotConvert(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CouldNotConvert, p0);
- }
-
- ///
- /// A string like "The method '{0}' is not supported."
- ///
- internal static string ALinq_MethodNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_MethodNotSupported, p0);
- }
-
- ///
- /// A string like "The unary operator '{0}' is not supported."
- ///
- internal static string ALinq_UnaryNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_UnaryNotSupported, p0);
- }
-
- ///
- /// A string like "The binary operator '{0}' is not supported."
- ///
- internal static string ALinq_BinaryNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_BinaryNotSupported, p0);
- }
-
- ///
- /// A string like "The constant for '{0}' is not supported."
- ///
- internal static string ALinq_ConstantNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ConstantNotSupported, p0);
- }
-
- ///
- /// A string like "An operation between an expression and a type is not supported."
- ///
- internal static string ALinq_TypeBinaryNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_TypeBinaryNotSupported);
- }
- }
-
- ///
- /// A string like "The conditional expression is not supported."
- ///
- internal static string ALinq_ConditionalNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ConditionalNotSupported);
- }
- }
-
- ///
- /// A string like "The parameter expression is not supported."
- ///
- internal static string ALinq_ParameterNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ParameterNotSupported);
- }
- }
-
- ///
- /// A string like "The member access of '{0}' is not supported."
- ///
- internal static string ALinq_MemberAccessNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_MemberAccessNotSupported, p0);
- }
-
- ///
- /// A string like "Lambda Expressions not supported."
- ///
- internal static string ALinq_LambdaNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_LambdaNotSupported);
- }
- }
-
- ///
- /// A string like "New Expressions not supported."
- ///
- internal static string ALinq_NewNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_NewNotSupported);
- }
- }
-
- ///
- /// A string like "Member Init Expressions not supported."
- ///
- internal static string ALinq_MemberInitNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_MemberInitNotSupported);
- }
- }
-
- ///
- /// A string like "List Init Expressions not supported."
- ///
- internal static string ALinq_ListInitNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ListInitNotSupported);
- }
- }
-
- ///
- /// A string like "New Array Expressions not supported."
- ///
- internal static string ALinq_NewArrayNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_NewArrayNotSupported);
- }
- }
-
- ///
- /// A string like "Invocation Expressions not supported."
- ///
- internal static string ALinq_InvocationNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_InvocationNotSupported);
- }
- }
-
- ///
- /// A string like "Can only specify query options (orderby, where, take, skip) after last navigation."
- ///
- internal static string ALinq_QueryOptionsOnlyAllowedOnLeafNodes
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_QueryOptionsOnlyAllowedOnLeafNodes);
- }
- }
-
- ///
- /// A string like "Expand query option not allowed."
- ///
- internal static string ALinq_CantExpand
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantExpand);
- }
- }
-
- ///
- /// A string like "Can't cast to unsupported type '{0}'"
- ///
- internal static string ALinq_CantCastToUnsupportedPrimitive(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantCastToUnsupportedPrimitive, p0);
- }
-
- ///
- /// A string like "Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type."
- ///
- internal static string ALinq_CantNavigateWithoutKeyPredicate
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantNavigateWithoutKeyPredicate);
- }
- }
-
- ///
- /// A string like "Multiple key predicates cannot be specified for the same entity set."
- ///
- internal static string ALinq_CanOnlyApplyOneKeyPredicate
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CanOnlyApplyOneKeyPredicate);
- }
- }
-
- ///
- /// A string like "The expression {0} is not supported."
- ///
- internal static string ALinq_CantTranslateExpression(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantTranslateExpression, p0);
- }
-
- ///
- /// A string like "Error translating Linq expression to URI: {0}"
- ///
- internal static string ALinq_TranslationError(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_TranslationError, p0);
- }
-
- ///
- /// A string like "Custom query option not allowed."
- ///
- internal static string ALinq_CantAddQueryOption
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantAddQueryOption);
- }
- }
-
- ///
- /// A string like "Can't add duplicate query option '{0}'."
- ///
- internal static string ALinq_CantAddDuplicateQueryOption(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantAddDuplicateQueryOption, p0);
- }
-
- ///
- /// A string like "Can't add query option '{0}' because it would conflict with the query options from the translated Linq expression."
- ///
- internal static string ALinq_CantAddAstoriaQueryOption(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantAddAstoriaQueryOption, p0);
- }
-
- ///
- /// A string like "The query option '{0}' is not supported or is controlled by the OData service."
- ///
- internal static string ALinq_QueryOptionNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_QueryOptionNotSupported, p0);
- }
-
- ///
- /// A string like "Referencing public field '{0}' not supported in query option expression. Use public property instead."
- ///
- internal static string ALinq_CantReferToPublicField(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CantReferToPublicField, p0);
- }
-
- ///
- /// A string like "Cannot specify query options (orderby, where, take, skip, count) on single resource."
- ///
- internal static string ALinq_QueryOptionsOnlyAllowedOnSingletons
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_QueryOptionsOnlyAllowedOnSingletons);
- }
- }
-
- ///
- /// A string like "The {0} query option cannot be specified after the {1} query option."
- ///
- internal static string ALinq_QueryOptionOutOfOrder(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_QueryOptionOutOfOrder, p0, p1);
- }
-
- ///
- /// A string like "Cannot add count option to the resource set."
- ///
- internal static string ALinq_CannotAddCountOption
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CannotAddCountOption);
- }
- }
-
- ///
- /// A string like "Cannot add count option to the resource set because it would conflict with existing count options."
- ///
- internal static string ALinq_CannotAddCountOptionConflict
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CannotAddCountOptionConflict);
- }
- }
-
- ///
- /// A string like "Can only specify 'select' query option after last navigation."
- ///
- internal static string ALinq_ProjectionOnlyAllowedOnLeafNodes
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ProjectionOnlyAllowedOnLeafNodes);
- }
- }
-
- ///
- /// A string like "Cannot translate multiple Linq Select operations in a single 'select' query option."
- ///
- internal static string ALinq_ProjectionCanOnlyHaveOneProjection
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ProjectionCanOnlyHaveOneProjection);
- }
- }
-
- ///
- /// A string like "Cannot initialize an instance of entity type '{0}' because '{1}' and '{2}' do not refer to the same source entity."
- ///
- internal static string ALinq_ProjectionMemberAssignmentMismatch(object p0, object p1, object p2)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ProjectionMemberAssignmentMismatch, p0, p1, p2);
- }
-
- ///
- /// A string like "The expression '{0}' is not a valid expression for navigation path. The only supported operations inside the lambda expression body are MemberAccess and TypeAs. The expression must contain at least one MemberAccess and it cannot end with TypeAs."
- ///
- internal static string ALinq_InvalidExpressionInNavigationPath(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_InvalidExpressionInNavigationPath, p0);
- }
-
- ///
- /// A string like "Initializing instances of the entity type {0} with the expression {1} is not supported."
- ///
- internal static string ALinq_ExpressionNotSupportedInProjectionToEntity(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ExpressionNotSupportedInProjectionToEntity, p0, p1);
- }
-
- ///
- /// A string like "Constructing or initializing instances of the type {0} with the expression {1} is not supported."
- ///
- internal static string ALinq_ExpressionNotSupportedInProjection(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ExpressionNotSupportedInProjection, p0, p1);
- }
-
- ///
- /// A string like "Construction of entity type instances must use object initializer with default constructor."
- ///
- internal static string ALinq_CannotConstructKnownEntityTypes
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CannotConstructKnownEntityTypes);
- }
- }
-
- ///
- /// A string like "Referencing of local entity type instances not supported when projecting results."
- ///
- internal static string ALinq_CannotCreateConstantEntity
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CannotCreateConstantEntity);
- }
- }
-
- ///
- /// A string like "Cannot assign the value from the {0} property to the {1} property. When projecting results into a entity type, the property names of the source type and the target type must match for the properties being projected."
- ///
- internal static string ALinq_PropertyNamesMustMatchInProjections(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_PropertyNamesMustMatchInProjections, p0, p1);
- }
-
- ///
- /// A string like "Can only project the last entity type in the query being translated."
- ///
- internal static string ALinq_CanOnlyProjectTheLeaf
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CanOnlyProjectTheLeaf);
- }
- }
-
- ///
- /// A string like "Cannot create projection while there is an explicit expansion specified on the same query."
- ///
- internal static string ALinq_CannotProjectWithExplicitExpansion
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CannotProjectWithExplicitExpansion);
- }
- }
-
- ///
- /// A string like "The collection property '{0}' cannot be used in an 'orderby' query expression. Collection properties are not supported by the 'orderby' query option."
- ///
- internal static string ALinq_CollectionPropertyNotSupportedInOrderBy(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CollectionPropertyNotSupportedInOrderBy, p0);
- }
-
- ///
- /// A string like "The collection property '{0}' cannot be used in a 'where' query expression. Collection properties are only supported as the source of 'any' or 'all' methods in a 'where' query option."
- ///
- internal static string ALinq_CollectionPropertyNotSupportedInWhere(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CollectionPropertyNotSupportedInWhere, p0);
- }
-
- ///
- /// A string like "Navigation to members of the collection property '{0}' in a 'select' query expression is not supported."
- ///
- internal static string ALinq_CollectionMemberAccessNotSupportedInNavigation(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CollectionMemberAccessNotSupportedInNavigation, p0);
- }
-
- ///
- /// A string like "The property '{0}' of type 'DataServiceStreamLink' cannot be used in 'where' or 'orderby' query expressions. Properties of type 'DataServiceStreamLink' are not supported by these query options."
- ///
- internal static string ALinq_LinkPropertyNotSupportedInExpression(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_LinkPropertyNotSupportedInExpression, p0);
- }
-
- ///
- /// A string like "The target type for an OfType filter could not be determined."
- ///
- internal static string ALinq_OfTypeArgumentNotAvailable
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_OfTypeArgumentNotAvailable);
- }
- }
-
- ///
- /// A string like "Non-redundant type filters (OfType<T>, C# 'as' and VB 'TryCast') can only be used once per resource set."
- ///
- internal static string ALinq_CannotUseTypeFiltersMultipleTimes
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_CannotUseTypeFiltersMultipleTimes);
- }
- }
-
- ///
- /// A string like "Unsupported expression '{0}' in '{1}' method. Expression cannot end with TypeAs."
- ///
- internal static string ALinq_ExpressionCannotEndWithTypeAs(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ExpressionCannotEndWithTypeAs, p0, p1);
- }
-
- ///
- /// A string like "The expression 'TypeAs' is not supported when MaxProtocolVersion is less than '3.0'."
- ///
- internal static string ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3);
- }
- }
-
- ///
- /// A string like "The type '{0}' is not an entity type. The target type for a TypeAs operator must be an entity type."
- ///
- internal static string ALinq_TypeAsArgumentNotEntityType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_TypeAsArgumentNotEntityType, p0);
- }
-
- ///
- /// A string like "The source parameter for the '{0}' method has to be either a navigation or a collection property."
- ///
- internal static string ALinq_InvalidSourceForAnyAll(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_InvalidSourceForAnyAll, p0);
- }
-
- ///
- /// A string like "The method '{0}' is not supported by the 'orderby' query option."
- ///
- internal static string ALinq_AnyAllNotSupportedInOrderBy(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_AnyAllNotSupportedInOrderBy, p0);
- }
-
- ///
- /// A string like "The '$format' query option is not supported. Use the DataServiceContext.Format property to set the desired format."
- ///
- internal static string ALinq_FormatQueryOptionNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_FormatQueryOptionNotSupported);
- }
- }
-
- ///
- /// A string like "Found the following illegal system token while building a projection or expansion path: '{0}'"
- ///
- internal static string ALinq_IllegalSystemQueryOption(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_IllegalSystemQueryOption, p0);
- }
-
- ///
- /// A string like "Found a projection as a non-leaf segment in an expand path. Please rephrase your query. The projected property was : '{0}'"
- ///
- internal static string ALinq_IllegalPathStructure(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_IllegalPathStructure, p0);
- }
-
- ///
- /// A string like "Found an illegal type token '{0}' without a trailing navigation property."
- ///
- internal static string ALinq_TypeTokenWithNoTrailingNavProp(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_TypeTokenWithNoTrailingNavProp, p0);
- }
-
- ///
- /// A string like "The Contains method cannot be used with an empty collection."
- ///
- internal static string ALinq_ContainsNotValidOnEmptyCollection
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_ContainsNotValidOnEmptyCollection);
- }
- }
-
- ///
- /// A string like "The aggregation method '{0}' is not supported."
- ///
- internal static string ALinq_AggregationMethodNotSupported(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_AggregationMethodNotSupported, p0);
- }
-
- ///
- /// A string like "The expression '{0}' is not a valid aggregate expression. The aggregate expression must evaluate to a single-valued property path to an aggregatable property."
- ///
- internal static string ALinq_InvalidAggregateExpression(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_InvalidAggregateExpression, p0);
- }
-
- ///
- /// A string like "The expression '{0}' is not a valid expression for grouping. The grouping expression must evaluate to a single-valued property path, i.e., a path ending in a single-valued primitive."
- ///
- internal static string ALinq_InvalidGroupingExpression(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_InvalidGroupingExpression, p0);
- }
-
- ///
- /// A string like "The expression '{0}' in the GroupBy key selector is not supported."
- ///
- internal static string ALinq_InvalidGroupByKeySelector(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ALinq_InvalidGroupByKeySelector, p0);
- }
-
- ///
- /// A string like "DataServiceKey attribute must specify at least one property name."
- ///
- internal static string DSKAttribute_MustSpecifyAtleastOnePropertyName
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DSKAttribute_MustSpecifyAtleastOnePropertyName);
- }
- }
-
- ///
- /// A string like "Target collection for the Load operation must have an associated DataServiceContext."
- ///
- internal static string DataServiceCollection_LoadRequiresTargetCollectionObserved
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_LoadRequiresTargetCollectionObserved);
- }
- }
-
- ///
- /// A string like "The tracking of DataServiceCollection can not be stopped for child collections."
- ///
- internal static string DataServiceCollection_CannotStopTrackingChildCollection
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_CannotStopTrackingChildCollection);
- }
- }
-
- ///
- /// A string like "This operation is only supported on collections that are being tracked."
- ///
- internal static string DataServiceCollection_OperationForTrackedOnly
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_OperationForTrackedOnly);
- }
- }
-
- ///
- /// A string like "The DataServiceContext to which the DataServiceCollection instance belongs could not be determined. The DataServiceContext must either be supplied in the DataServiceCollection constructor or be used to create the DataServiceQuery or QueryOperationResponse object that is the source of the items in the DataServiceCollection."
- ///
- internal static string DataServiceCollection_CannotDetermineContextFromItems
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_CannotDetermineContextFromItems);
- }
- }
-
- ///
- /// A string like "An item could not be added to the collection. When items in a DataServiceCollection are tracked by the DataServiceContext, new items cannot be added before items have been loaded into the collection."
- ///
- internal static string DataServiceCollection_InsertIntoTrackedButNotLoadedCollection
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_InsertIntoTrackedButNotLoadedCollection);
- }
- }
-
- ///
- /// A string like "A previous LoadAsync operation has not yet completed. You cannot call the LoadAsync method on the DataServiceCollection again until the previous operation has completed."
- ///
- internal static string DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime);
- }
- }
-
- ///
- /// A string like "The LoadAsync method cannot be called when the DataServiceCollection is not a child collection of a related entity."
- ///
- internal static string DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity);
- }
- }
-
- ///
- /// A string like "Only a typed DataServiceQuery object can be supplied when calling the LoadAsync method on DataServiceCollection."
- ///
- internal static string DataServiceCollection_LoadAsyncRequiresDataServiceQuery
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceCollection_LoadAsyncRequiresDataServiceQuery);
- }
- }
-
- ///
- /// A string like "The DataServiceCollection to be tracked must contain entity typed elements with at least one key property. The element type '{0}' does not have any key property."
- ///
- internal static string DataBinding_DataServiceCollectionArgumentMustHaveEntityType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_DataServiceCollectionArgumentMustHaveEntityType, p0);
- }
-
- ///
- /// A string like "Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property '{0}' for entity type '{1}'."
- ///
- internal static string DataBinding_CollectionPropertySetterValueHasObserver(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_CollectionPropertySetterValueHasObserver, p0, p1);
- }
-
- ///
- /// A string like "Unexpected action '{0}' on the OnCollectionChanged event raised by DataServiceCollection."
- ///
- internal static string DataBinding_DataServiceCollectionChangedUnknownActionCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_DataServiceCollectionChangedUnknownActionCollection, p0);
- }
-
- ///
- /// A string like "Unexpected action '{0}' on the OnCollectionChanged event raised by a collection object of type '{1}'."
- ///
- internal static string DataBinding_CollectionChangedUnknownActionCollection(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_CollectionChangedUnknownActionCollection, p0, p1);
- }
-
- ///
- /// A string like "Add/Update/Delete operation cannot be performed on a child entity, if the parent entity is already detached."
- ///
- internal static string DataBinding_BindingOperation_DetachedSource
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_BindingOperation_DetachedSource);
- }
- }
-
- ///
- /// A string like "Null values are disallowed during '{0}' operations on DataServiceCollection."
- ///
- internal static string DataBinding_BindingOperation_ArrayItemNull(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_BindingOperation_ArrayItemNull, p0);
- }
-
- ///
- /// A string like "A value provided during '{0}' operation on DataServiceCollection is not of an entity type with key."
- ///
- internal static string DataBinding_BindingOperation_ArrayItemNotEntity(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_BindingOperation_ArrayItemNotEntity, p0);
- }
-
- ///
- /// A string like "Entity set name has not been provided for an entity of type '{0}'."
- ///
- internal static string DataBinding_Util_UnknownEntitySetName(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_Util_UnknownEntitySetName, p0);
- }
-
- ///
- /// A string like "An attempt was made to add entity of type '{0}' to a collection in which the same entity already exists."
- ///
- internal static string DataBinding_EntityAlreadyInCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_EntityAlreadyInCollection, p0);
- }
-
- ///
- /// A string like "An attempt to track an entity or complex type failed because the entity or complex type '{0}' does not implement the INotifyPropertyChanged interface."
- ///
- internal static string DataBinding_NotifyPropertyChangedNotImpl(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_NotifyPropertyChangedNotImpl, p0);
- }
-
- ///
- /// A string like "An attempt to track an entity or complex type failed because the entity or complex type contains a collection property of type '{0}' that does not implement the INotifyCollectionChanged interface."
- ///
- internal static string DataBinding_NotifyCollectionChangedNotImpl(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_NotifyCollectionChangedNotImpl, p0);
- }
-
- ///
- /// A string like "An attempt to track a complex object of type '{0}' failed because the complex object is already being tracked."
- ///
- internal static string DataBinding_ComplexObjectAssociatedWithMultipleEntities(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_ComplexObjectAssociatedWithMultipleEntities, p0);
- }
-
- ///
- /// A string like "An attempt to track a collection object of type '{0}' failed because the collection object is already being tracked."
- ///
- internal static string DataBinding_CollectionAssociatedWithMultipleEntities(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataBinding_CollectionAssociatedWithMultipleEntities, p0);
- }
-
- ///
- /// A string like "Expected exactly one entry in the response from the server, but none was found."
- ///
- internal static string Parser_SingleEntry_NoneFound
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Parser_SingleEntry_NoneFound);
- }
- }
-
- ///
- /// A string like "Expected exactly one entry in the response from the server, but more than one was found."
- ///
- internal static string Parser_SingleEntry_MultipleFound
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Parser_SingleEntry_MultipleFound);
- }
- }
-
- ///
- /// A string like "Expected a feed or entry in the response from the server, but found an unexpected element instead."
- ///
- internal static string Parser_SingleEntry_ExpectedFeedOrEntry
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Parser_SingleEntry_ExpectedFeedOrEntry);
- }
- }
-
- ///
- /// A string like "The null value from property '{0}' cannot be assigned to a type '{1}'."
- ///
- internal static string Materializer_CannotAssignNull(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_CannotAssignNull, p0, p1);
- }
-
- ///
- /// A string like "An entry of type '{0}' cannot be added to a collection that contains instances of type '{1}'. This may occur when an existing entry of a different type has the same identity value or when the same entity is projected into two different types in a single query."
- ///
- internal static string Materializer_EntryIntoCollectionMismatch(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_EntryIntoCollectionMismatch, p0, p1);
- }
-
- ///
- /// A string like "An entry returned by the navigation property '{0}' is null and cannot be initialized. You should check for a null value before accessing this property."
- ///
- internal static string Materializer_EntryToAccessIsNull(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_EntryToAccessIsNull, p0);
- }
-
- ///
- /// A string like "An entry that contains the data required to create an instance of type '{0}' is null and cannot be initialized. You should check for a null value before accessing this entry."
- ///
- internal static string Materializer_EntryToInitializeIsNull(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_EntryToInitializeIsNull, p0);
- }
-
- ///
- /// A string like "An entity of type '{0}' cannot be projected because there is already an instance of type '{1}' for '{2}'."
- ///
- internal static string Materializer_ProjectEntityTypeMismatch(object p0, object p1, object p2)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_ProjectEntityTypeMismatch, p0, p1, p2);
- }
-
- ///
- /// A string like "The expected property '{0}' could not be found while processing an entry. Check for null before accessing this property."
- ///
- internal static string Materializer_PropertyMissing(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_PropertyMissing, p0);
- }
-
- ///
- /// A string like "Property '{0}' is not an entity."
- ///
- internal static string Materializer_PropertyNotExpectedEntry(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_PropertyNotExpectedEntry, p0);
- }
-
- ///
- /// A string like "A DataServiceCollection can only contain entity types. Primitive and complex types cannot be contained by this kind of collection."
- ///
- internal static string Materializer_DataServiceCollectionNotSupportedForNonEntities
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_DataServiceCollectionNotSupportedForNonEntities);
- }
- }
-
- ///
- /// A string like "Collection property '{0}' cannot be created because the type '{1}' does not have a public parameterless constructor."
- ///
- internal static string Materializer_NoParameterlessCtorForCollectionProperty(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_NoParameterlessCtorForCollectionProperty, p0, p1);
- }
-
- ///
- /// A string like "The element '{0}' is not a valid collection item. The name of the collection item element must be 'element' and must belong to the 'http://docs.oasis-open.org/odata/ns/data' namespace."
- ///
- internal static string Materializer_InvalidCollectionItem(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_InvalidCollectionItem, p0);
- }
-
- ///
- /// A string like "There is a type mismatch between the client and the service. Type '{0}' is an entity type, but the type in the response payload does not represent an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client."
- ///
- internal static string Materializer_InvalidEntityType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_InvalidEntityType, p0);
- }
-
- ///
- /// A string like "There is a type mismatch between the client and the service. Type '{0}' is not an entity type, but the type in the response payload represents an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client."
- ///
- internal static string Materializer_InvalidNonEntityType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_InvalidNonEntityType, p0);
- }
-
- ///
- /// A string like "Materialization of top level collection expected ICollection<>, but actual type was {0}."
- ///
- internal static string Materializer_CollectionExpectedCollection(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_CollectionExpectedCollection, p0);
- }
-
- ///
- /// A string like "The response payload is a not a valid response payload. Please make sure that the top level element is a valid JSON element or belongs to '{0}' namespace."
- ///
- internal static string Materializer_InvalidResponsePayload(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_InvalidResponsePayload, p0);
- }
-
- ///
- /// A string like "The response content type '{0}' is not currently supported."
- ///
- internal static string Materializer_InvalidContentTypeEncountered(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_InvalidContentTypeEncountered, p0);
- }
-
- ///
- /// A string like "Cannot materialize the results into a collection type '{0}' because it does not have a parameterless constructor."
- ///
- internal static string Materializer_MaterializationTypeError(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_MaterializationTypeError, p0);
- }
-
- ///
- /// A string like "Reset should never be called for collection reader in an internal enumerable."
- ///
- internal static string Materializer_ResetAfterEnumeratorCreationError
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_ResetAfterEnumeratorCreationError);
- }
- }
-
- ///
- /// A string like "Cannot materialize a collection of a primitives or complex without the type '{0}' being a collection."
- ///
- internal static string Materializer_TypeShouldBeCollectionError(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Materializer_TypeShouldBeCollectionError, p0);
- }
-
- ///
- /// A string like "A circular loop was detected while serializing the property '{0}'. You must make sure that loops are not present in properties that return a collection or complex type."
- ///
- internal static string Serializer_LoopsNotAllowedInComplexTypes(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_LoopsNotAllowedInComplexTypes, p0);
- }
-
- ///
- /// A string like "A circular loop was detected while serializing the complex type '{0}'. You must make sure that loops are not present in a collection or a complex type."
- ///
- internal static string Serializer_LoopsNotAllowedInNonPropertyComplexTypes(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_LoopsNotAllowedInNonPropertyComplexTypes, p0);
- }
-
- ///
- /// A string like "The operation parameter named '{0}' has a collection item of Edm type kind '{1}'. A collection item must be either a primitive type or a complex Edm type kind."
- ///
- internal static string Serializer_InvalidCollectionParameterItemType(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_InvalidCollectionParameterItemType, p0, p1);
- }
-
- ///
- /// A string like "The operation parameter named '{0}' has a null collection item. The items of a collection must not be null."
- ///
- internal static string Serializer_NullCollectionParameterItemValue(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_NullCollectionParameterItemValue, p0);
- }
-
- ///
- /// A string like "The operation parameter named '{0}' was of Edm type kind '{1}'. An operation parameter must be either a primitive type, a complex type or a collection of primitive or complex types."
- ///
- internal static string Serializer_InvalidParameterType(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_InvalidParameterType, p0, p1);
- }
-
- ///
- /// A string like "The parameter alias '{0}' was not present in the request URI. All parameters passed as alias must be present in the request URI."
- ///
- internal static string Serializer_UriDoesNotContainParameterAlias(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_UriDoesNotContainParameterAlias, p0);
- }
-
- ///
- /// A string like "The enum type '{0}' has no member named '{1}'."
- ///
- internal static string Serializer_InvalidEnumMemberValue(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Serializer_InvalidEnumMemberValue, p0, p1);
- }
-
- ///
- /// A string like "This target framework does not enable you to directly enumerate over a data service query. This is because enumeration automatically sends a synchronous request to the data service. Because this framework only supports asynchronous operations, you must instead call the BeginExecute and EndExecute methods to obtain a query result that supports enumeration."
- ///
- internal static string DataServiceQuery_EnumerationNotSupported
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceQuery_EnumerationNotSupported);
- }
- }
-
- ///
- /// A string like "Only instances of HttpWebRequest are currently allowed for this property. Other subtypes of WebRequest are not supported."
- ///
- internal static string Context_SendingRequestEventArgsNotHttp
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_SendingRequestEventArgsNotHttp);
- }
- }
-
- ///
- /// A string like "An internal error '{0}' occurred."
- ///
- internal static string General_InternalError(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.General_InternalError, p0);
- }
-
- ///
- /// A string like "The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required."
- ///
- internal static string ODataMetadataBuilder_MissingEntitySetUri(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ODataMetadataBuilder_MissingEntitySetUri, p0);
- }
-
- ///
- /// A string like "The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments."
- ///
- internal static string ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix, p0, p1);
- }
-
- ///
- /// A string like "Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required."
- ///
- internal static string ODataMetadataBuilder_MissingEntityInstanceUri(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ODataMetadataBuilder_MissingEntityInstanceUri, p0);
- }
-
- ///
- /// A string like "The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type."
- ///
- internal static string EdmValueUtils_UnsupportedPrimitiveType(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.EdmValueUtils_UnsupportedPrimitiveType, p0);
- }
-
- ///
- /// A string like "Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'."
- ///
- internal static string EdmValueUtils_IncorrectPrimitiveTypeKind(object p0, object p1, object p2)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.EdmValueUtils_IncorrectPrimitiveTypeKind, p0, p1, p2);
- }
-
- ///
- /// A string like "Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'."
- ///
- internal static string EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName(object p0, object p1)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName, p0, p1);
- }
-
- ///
- /// A string like "A value with primitive kind '{0}' cannot be converted into a primitive object value."
- ///
- internal static string EdmValueUtils_CannotConvertTypeToClrValue(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.EdmValueUtils_CannotConvertTypeToClrValue, p0);
- }
-
- ///
- /// A string like "The value '{0}' is not a valid duration value."
- ///
- internal static string ValueParser_InvalidDuration(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.ValueParser_InvalidDuration, p0);
- }
-
- ///
- /// A string like "The time zone information is missing on the DateTimeOffset value '{0}'. A DateTimeOffset value must contain the time zone information."
- ///
- internal static string PlatformHelper_DateTimeOffsetMustContainTimeZone(object p0)
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.PlatformHelper_DateTimeOffsetMustContainTimeZone, p0);
- }
-
- ///
- /// A string like "Failed to get the count value from the server."
- ///
- internal static string DataServiceRequest_FailGetCount
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceRequest_FailGetCount);
- }
- }
-
- ///
- /// A string like "Failed to get the value from the server."
- ///
- internal static string DataServiceRequest_FailGetValue
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.DataServiceRequest_FailGetValue);
- }
- }
-
- ///
- /// A string like "Execute overload for void service operations and actions received a non-void response from the server."
- ///
- internal static string Context_ExecuteExpectedVoidResponse
- {
- get
- {
- return Microsoft.OData.Client.TextRes.GetString(Microsoft.OData.Client.TextRes.Context_ExecuteExpectedVoidResponse);
- }
- }
-
- }
-
- ///
- /// Strongly-typed and parameterized exception factory.
- ///
- internal static partial class Error {
-
- ///
- /// The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method that does not accept it as a valid argument.
- ///
- internal static Exception ArgumentNull(string paramName) {
- return new ArgumentNullException(paramName);
- }
-
- ///
- /// The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.
- ///
- internal static Exception ArgumentOutOfRange(string paramName) {
- return new ArgumentOutOfRangeException(paramName);
- }
-
- ///
- /// The exception that is thrown when the author has not yet implemented the logic at this point in the program. This can act as an exception based TODO tag.
- ///
- internal static Exception NotImplemented() {
- return new NotImplementedException();
- }
-
- ///
- /// The exception that is thrown when an invoked method is not supported, or when there is an attempt to read, seek, or write to a stream that does not support the invoked functionality.
- ///
- internal static Exception NotSupported() {
- return new NotSupportedException();
- }
- }
-}
diff --git a/src/Microsoft.OData.Client/Parameterized.Microsoft.OData.Client.tt b/src/Microsoft.OData.Client/Parameterized.Microsoft.OData.Client.tt
deleted file mode 100644
index 683958f939..0000000000
--- a/src/Microsoft.OData.Client/Parameterized.Microsoft.OData.Client.tt
+++ /dev/null
@@ -1,20 +0,0 @@
-<#@ include file="..\..\tools\StringResourceGenerator\StringsClassGenerator.ttinclude" #>
-<#+
-public static class Configuration
-{
- // The namespace where the generated resource classes reside.
- public const string ResourceClassNamespace = "Microsoft.OData.Client";
-
- // The assembly name where the generated resource classes will be linked.
- public const string AssemblyName = "Microsoft.OData.Client";
-
- // The name of the generated resource class.
- public const string ResourceClassName = "TextRes";
-
- // The list of text files containing all the string resources.
- public static readonly string[] TextFiles = {
- "Microsoft.OData.Client.Common.txt",
- "Microsoft.OData.Client.Desktop.txt"
- };
-}
-#>
\ No newline at end of file
diff --git a/src/Microsoft.OData.Client/QueryOperationResponse.cs b/src/Microsoft.OData.Client/QueryOperationResponse.cs
index c186f6fb19..5c2afc23c9 100644
--- a/src/Microsoft.OData.Client/QueryOperationResponse.cs
+++ b/src/Microsoft.OData.Client/QueryOperationResponse.cs
@@ -72,7 +72,7 @@ internal ObjectMaterializer Results
{
if (this.Error != null)
{
- throw Microsoft.OData.Client.Error.InvalidOperation(Strings.Context_BatchExecuteError, this.Error);
+ throw Microsoft.OData.Client.Error.InvalidOperation(SRResources.Context_BatchExecuteError, this.Error);
}
return this.results;
@@ -159,7 +159,7 @@ protected T GetEnumeratorHelper(Func getEnumerator) where T : IEnumerator
if (materializedCollection == null)
{
- throw new DataServiceClientException(Strings.Materializer_CollectionExpectedCollection(innerObject.GetType().ToString()));
+ throw new DataServiceClientException(Client.Error.Format(SRResources.Materializer_CollectionExpectedCollection, innerObject.GetType().ToString()));
}
Debug.Assert(!enumerator.MoveNext(), "MaterializationEvents of top level collection expected one result of ICollection<>, but found at least 2 results");
diff --git a/src/Microsoft.OData.Client/QueryOperationResponseOfT.cs b/src/Microsoft.OData.Client/QueryOperationResponseOfT.cs
index 77fededc4e..f1e38f4232 100644
--- a/src/Microsoft.OData.Client/QueryOperationResponseOfT.cs
+++ b/src/Microsoft.OData.Client/QueryOperationResponseOfT.cs
@@ -52,7 +52,7 @@ public override long Count
}
else
{
- throw new InvalidOperationException(Strings.MaterializeFromObject_CountNotPresent);
+ throw new InvalidOperationException(SRResources.MaterializeFromObject_CountNotPresent);
}
}
}
diff --git a/src/Microsoft.OData.Client/QueryResult.cs b/src/Microsoft.OData.Client/QueryResult.cs
index cfeaa35cd0..ac663e700a 100644
--- a/src/Microsoft.OData.Client/QueryResult.cs
+++ b/src/Microsoft.OData.Client/QueryResult.cs
@@ -149,7 +149,7 @@ internal static QueryResult EndExecuteQuery(object source, string meth
if (operationResponse != null)
{
operationResponse.Error = ex;
- throw new DataServiceQueryException(Strings.DataServiceException_GeneralError, ex, operationResponse);
+ throw new DataServiceQueryException(SRResources.DataServiceException_GeneralError, ex, operationResponse);
}
throw;
diff --git a/src/Microsoft.OData.Client/RequestInfo.cs b/src/Microsoft.OData.Client/RequestInfo.cs
index 06a9098d48..589854853e 100644
--- a/src/Microsoft.OData.Client/RequestInfo.cs
+++ b/src/Microsoft.OData.Client/RequestInfo.cs
@@ -349,7 +349,7 @@ internal InvalidOperationException ValidateResponseVersion(Version responseVersi
{
if (responseVersion != null && responseVersion > this.Context.MaxProtocolVersionAsVersion)
{
- string message = Strings.Context_ResponseVersionIsBiggerThanProtocolVersion(
+ string message = Error.Format(SRResources.Context_ResponseVersionIsBiggerThanProtocolVersion,
responseVersion.ToString(),
this.Context.MaxProtocolVersion.ToString());
return Error.InvalidOperation(message);
@@ -436,7 +436,7 @@ internal DataServiceClientRequestMessage CreateRequestMessage(BuildingRequestEve
clientRequestMessage = this.Configurations.RequestPipeline.OnMessageCreating(clientRequestMessageArgs);
if (clientRequestMessage == null)
{
- throw Error.InvalidOperation(Strings.Context_OnMessageCreatingReturningNull);
+ throw Error.InvalidOperation(SRResources.Context_OnMessageCreatingReturningNull);
}
}
else
diff --git a/src/Microsoft.OData.Client/SRResources.Designer.cs b/src/Microsoft.OData.Client/SRResources.Designer.cs
new file mode 100644
index 0000000000..85050cd27b
--- /dev/null
+++ b/src/Microsoft.OData.Client/SRResources.Designer.cs
@@ -0,0 +1,2412 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Microsoft.OData.Client {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class SRResources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal SRResources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.OData.Client.SRResources", typeof(SRResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The aggregation method '{0}' is not supported..
+ ///
+ internal static string ALinq_AggregationMethodNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_AggregationMethodNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The method '{0}' is not supported by the 'orderby' query option..
+ ///
+ internal static string ALinq_AnyAllNotSupportedInOrderBy {
+ get {
+ return ResourceManager.GetString("ALinq_AnyAllNotSupportedInOrderBy", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The binary operator '{0}' is not supported..
+ ///
+ internal static string ALinq_BinaryNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_BinaryNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot add count option to the resource set..
+ ///
+ internal static string ALinq_CannotAddCountOption {
+ get {
+ return ResourceManager.GetString("ALinq_CannotAddCountOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot add count option to the resource set because it would conflict with existing count options..
+ ///
+ internal static string ALinq_CannotAddCountOptionConflict {
+ get {
+ return ResourceManager.GetString("ALinq_CannotAddCountOptionConflict", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Construction of entity type instances must use object initializer with default constructor..
+ ///
+ internal static string ALinq_CannotConstructKnownEntityTypes {
+ get {
+ return ResourceManager.GetString("ALinq_CannotConstructKnownEntityTypes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Referencing of local entity type instances not supported when projecting results..
+ ///
+ internal static string ALinq_CannotCreateConstantEntity {
+ get {
+ return ResourceManager.GetString("ALinq_CannotCreateConstantEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot create projection while there is an explicit expansion specified on the same query..
+ ///
+ internal static string ALinq_CannotProjectWithExplicitExpansion {
+ get {
+ return ResourceManager.GetString("ALinq_CannotProjectWithExplicitExpansion", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Non-redundant type filters (OfType <T>, C# 'as' and VB 'TryCast') can only be used once per resource set..
+ ///
+ internal static string ALinq_CannotUseTypeFiltersMultipleTimes {
+ get {
+ return ResourceManager.GetString("ALinq_CannotUseTypeFiltersMultipleTimes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Multiple key predicates cannot be specified for the same entity set..
+ ///
+ internal static string ALinq_CanOnlyApplyOneKeyPredicate {
+ get {
+ return ResourceManager.GetString("ALinq_CanOnlyApplyOneKeyPredicate", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can only project the last entity type in the query being translated..
+ ///
+ internal static string ALinq_CanOnlyProjectTheLeaf {
+ get {
+ return ResourceManager.GetString("ALinq_CanOnlyProjectTheLeaf", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can't add query option '{0}' because it would conflict with the query options from the translated Linq expression..
+ ///
+ internal static string ALinq_CantAddAstoriaQueryOption {
+ get {
+ return ResourceManager.GetString("ALinq_CantAddAstoriaQueryOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can't add duplicate query option '{0}'..
+ ///
+ internal static string ALinq_CantAddDuplicateQueryOption {
+ get {
+ return ResourceManager.GetString("ALinq_CantAddDuplicateQueryOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Custom query option not allowed..
+ ///
+ internal static string ALinq_CantAddQueryOption {
+ get {
+ return ResourceManager.GetString("ALinq_CantAddQueryOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can't add query option '{0}' because it begins with reserved character '$'..
+ ///
+ internal static string ALinq_CantAddQueryOptionStartingWithDollarSign {
+ get {
+ return ResourceManager.GetString("ALinq_CantAddQueryOptionStartingWithDollarSign", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can't cast to unsupported type '{0}'.
+ ///
+ internal static string ALinq_CantCastToUnsupportedPrimitive {
+ get {
+ return ResourceManager.GetString("ALinq_CantCastToUnsupportedPrimitive", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Expand query option not allowed..
+ ///
+ internal static string ALinq_CantExpand {
+ get {
+ return ResourceManager.GetString("ALinq_CantExpand", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type..
+ ///
+ internal static string ALinq_CantNavigateWithoutKeyPredicate {
+ get {
+ return ResourceManager.GetString("ALinq_CantNavigateWithoutKeyPredicate", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Referencing public field '{0}' not supported in query option expression. Use public property instead..
+ ///
+ internal static string ALinq_CantReferToPublicField {
+ get {
+ return ResourceManager.GetString("ALinq_CantReferToPublicField", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression {0} is not supported..
+ ///
+ internal static string ALinq_CantTranslateExpression {
+ get {
+ return ResourceManager.GetString("ALinq_CantTranslateExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Navigation to members of the collection property '{0}' in a 'select' query expression is not supported..
+ ///
+ internal static string ALinq_CollectionMemberAccessNotSupportedInNavigation {
+ get {
+ return ResourceManager.GetString("ALinq_CollectionMemberAccessNotSupportedInNavigation", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The collection property '{0}' cannot be used in an 'orderby' query expression. Collection properties are not supported by the 'orderby' query option..
+ ///
+ internal static string ALinq_CollectionPropertyNotSupportedInOrderBy {
+ get {
+ return ResourceManager.GetString("ALinq_CollectionPropertyNotSupportedInOrderBy", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The collection property '{0}' cannot be used in a 'where' query expression. Collection properties are only supported as the source of 'any' or 'all' methods in a 'where' query option..
+ ///
+ internal static string ALinq_CollectionPropertyNotSupportedInWhere {
+ get {
+ return ResourceManager.GetString("ALinq_CollectionPropertyNotSupportedInWhere", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The conditional expression is not supported..
+ ///
+ internal static string ALinq_ConditionalNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_ConditionalNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The constant for '{0}' is not supported..
+ ///
+ internal static string ALinq_ConstantNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_ConstantNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The Contains method cannot be used with an empty collection..
+ ///
+ internal static string ALinq_ContainsNotValidOnEmptyCollection {
+ get {
+ return ResourceManager.GetString("ALinq_ContainsNotValidOnEmptyCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not convert constant {0} expression to string..
+ ///
+ internal static string ALinq_CouldNotConvert {
+ get {
+ return ResourceManager.GetString("ALinq_CouldNotConvert", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unsupported expression '{0}' in '{1}' method. Expression cannot end with TypeAs..
+ ///
+ internal static string ALinq_ExpressionCannotEndWithTypeAs {
+ get {
+ return ResourceManager.GetString("ALinq_ExpressionCannotEndWithTypeAs", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Constructing or initializing instances of the type {0} with the expression {1} is not supported..
+ ///
+ internal static string ALinq_ExpressionNotSupportedInProjection {
+ get {
+ return ResourceManager.GetString("ALinq_ExpressionNotSupportedInProjection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Initializing instances of the entity type {0} with the expression {1} is not supported..
+ ///
+ internal static string ALinq_ExpressionNotSupportedInProjectionToEntity {
+ get {
+ return ResourceManager.GetString("ALinq_ExpressionNotSupportedInProjectionToEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The '$format' query option is not supported. Use the DataServiceContext.Format property to set the desired format..
+ ///
+ internal static string ALinq_FormatQueryOptionNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_FormatQueryOptionNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Found a projection as a non-leaf segment in an expand path. Please rephrase your query. The projected property was : '{0}'.
+ ///
+ internal static string ALinq_IllegalPathStructure {
+ get {
+ return ResourceManager.GetString("ALinq_IllegalPathStructure", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Found the following illegal system token while building a projection or expansion path: '{0}'.
+ ///
+ internal static string ALinq_IllegalSystemQueryOption {
+ get {
+ return ResourceManager.GetString("ALinq_IllegalSystemQueryOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression '{0}' is not a valid aggregate expression. The aggregate expression must evaluate to a single-valued property path to an aggregatable property..
+ ///
+ internal static string ALinq_InvalidAggregateExpression {
+ get {
+ return ResourceManager.GetString("ALinq_InvalidAggregateExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression '{0}' is not a valid expression for navigation path. The only supported operations inside the lambda expression body are MemberAccess and TypeAs. The expression must contain at least one MemberAccess and it cannot end with TypeAs..
+ ///
+ internal static string ALinq_InvalidExpressionInNavigationPath {
+ get {
+ return ResourceManager.GetString("ALinq_InvalidExpressionInNavigationPath", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression '{0}' in the GroupBy key selector is not supported..
+ ///
+ internal static string ALinq_InvalidGroupByKeySelector {
+ get {
+ return ResourceManager.GetString("ALinq_InvalidGroupByKeySelector", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression '{0}' is not a valid expression for grouping. The grouping expression must evaluate to a single-valued property path, i.e., a path ending in a single-valued primitive..
+ ///
+ internal static string ALinq_InvalidGroupingExpression {
+ get {
+ return ResourceManager.GetString("ALinq_InvalidGroupingExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The source parameter for the '{0}' method has to be either a navigation or a collection property..
+ ///
+ internal static string ALinq_InvalidSourceForAnyAll {
+ get {
+ return ResourceManager.GetString("ALinq_InvalidSourceForAnyAll", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invocation Expressions not supported..
+ ///
+ internal static string ALinq_InvocationNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_InvocationNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Lambda Expressions not supported..
+ ///
+ internal static string ALinq_LambdaNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_LambdaNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The property '{0}' of type 'DataServiceStreamLink' cannot be used in 'where' or 'orderby' query expressions. Properties of type 'DataServiceStreamLink' are not supported by these query options..
+ ///
+ internal static string ALinq_LinkPropertyNotSupportedInExpression {
+ get {
+ return ResourceManager.GetString("ALinq_LinkPropertyNotSupportedInExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to List Init Expressions not supported..
+ ///
+ internal static string ALinq_ListInitNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_ListInitNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The member access of '{0}' is not supported..
+ ///
+ internal static string ALinq_MemberAccessNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_MemberAccessNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Member Init Expressions not supported..
+ ///
+ internal static string ALinq_MemberInitNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_MemberInitNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The method '{0}' is not supported..
+ ///
+ internal static string ALinq_MethodNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_MethodNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to New Array Expressions not supported..
+ ///
+ internal static string ALinq_NewArrayNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_NewArrayNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to New Expressions not supported..
+ ///
+ internal static string ALinq_NewNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_NewNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The target type for an OfType filter could not be determined..
+ ///
+ internal static string ALinq_OfTypeArgumentNotAvailable {
+ get {
+ return ResourceManager.GetString("ALinq_OfTypeArgumentNotAvailable", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The parameter expression is not supported..
+ ///
+ internal static string ALinq_ParameterNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_ParameterNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot translate multiple Linq Select operations in a single 'select' query option..
+ ///
+ internal static string ALinq_ProjectionCanOnlyHaveOneProjection {
+ get {
+ return ResourceManager.GetString("ALinq_ProjectionCanOnlyHaveOneProjection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot initialize an instance of entity type '{0}' because '{1}' and '{2}' do not refer to the same source entity..
+ ///
+ internal static string ALinq_ProjectionMemberAssignmentMismatch {
+ get {
+ return ResourceManager.GetString("ALinq_ProjectionMemberAssignmentMismatch", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can only specify 'select' query option after last navigation..
+ ///
+ internal static string ALinq_ProjectionOnlyAllowedOnLeafNodes {
+ get {
+ return ResourceManager.GetString("ALinq_ProjectionOnlyAllowedOnLeafNodes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot assign the value from the {0} property to the {1} property. When projecting results into a entity type, the property names of the source type and the target type must match for the properties being projected..
+ ///
+ internal static string ALinq_PropertyNamesMustMatchInProjections {
+ get {
+ return ResourceManager.GetString("ALinq_PropertyNamesMustMatchInProjections", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The query option '{0}' is not supported or is controlled by the OData service..
+ ///
+ internal static string ALinq_QueryOptionNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_QueryOptionNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The {0} query option cannot be specified after the {1} query option..
+ ///
+ internal static string ALinq_QueryOptionOutOfOrder {
+ get {
+ return ResourceManager.GetString("ALinq_QueryOptionOutOfOrder", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can only specify query options (orderby, where, take, skip) after last navigation..
+ ///
+ internal static string ALinq_QueryOptionsOnlyAllowedOnLeafNodes {
+ get {
+ return ResourceManager.GetString("ALinq_QueryOptionsOnlyAllowedOnLeafNodes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot specify query options (orderby, where, take, skip, count) on single resource..
+ ///
+ internal static string ALinq_QueryOptionsOnlyAllowedOnSingletons {
+ get {
+ return ResourceManager.GetString("ALinq_QueryOptionsOnlyAllowedOnSingletons", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error translating Linq expression to URI: {0}.
+ ///
+ internal static string ALinq_TranslationError {
+ get {
+ return ResourceManager.GetString("ALinq_TranslationError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The type '{0}' is not an entity type. The target type for a TypeAs operator must be an entity type..
+ ///
+ internal static string ALinq_TypeAsArgumentNotEntityType {
+ get {
+ return ResourceManager.GetString("ALinq_TypeAsArgumentNotEntityType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression 'TypeAs' is not supported when MaxProtocolVersion is less than '3.0'..
+ ///
+ internal static string ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3 {
+ get {
+ return ResourceManager.GetString("ALinq_TypeAsNotSupportedForMaxDataServiceVersionLessThan3", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An operation between an expression and a type is not supported..
+ ///
+ internal static string ALinq_TypeBinaryNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_TypeBinaryNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Found an illegal type token '{0}' without a trailing navigation property. .
+ ///
+ internal static string ALinq_TypeTokenWithNoTrailingNavProp {
+ get {
+ return ResourceManager.GetString("ALinq_TypeTokenWithNoTrailingNavProp", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The unary operator '{0}' is not supported..
+ ///
+ internal static string ALinq_UnaryNotSupported {
+ get {
+ return ResourceManager.GetString("ALinq_UnaryNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expression type {0} is not supported..
+ ///
+ internal static string ALinq_UnsupportedExpression {
+ get {
+ return ResourceManager.GetString("ALinq_UnsupportedExpression", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "{0}"..
+ ///
+ internal static string Batch_ExpectedContentType {
+ get {
+ return ResourceManager.GetString("Batch_ExpectedContentType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The POST request expected a response with content. ID={0}.
+ ///
+ internal static string Batch_ExpectedResponse {
+ get {
+ return ResourceManager.GetString("Batch_ExpectedResponse", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Not all requests in the batch had a response..
+ ///
+ internal static string Batch_IncompleteResponseCount {
+ get {
+ return ResourceManager.GetString("Batch_IncompleteResponseCount", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The web response contained unexpected sections. ID={0}.
+ ///
+ internal static string Batch_UnexpectedContent {
+ get {
+ return ResourceManager.GetString("Batch_UnexpectedContent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Resolving type from '{0}' that inherits from '{1}' is ambiguous..
+ ///
+ internal static string ClientType_Ambiguous {
+ get {
+ return ResourceManager.GetString("ClientType_Ambiguous", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Collection properties of a collection type are not supported..
+ ///
+ internal static string ClientType_CollectionOfCollectionNotSupported {
+ get {
+ return ResourceManager.GetString("ClientType_CollectionOfCollectionNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The key property '{0}' on for type '{1}' is of type '{2}', which is not a simple type. Only properties of simple type can be key properties..
+ ///
+ internal static string ClientType_KeysMustBeSimpleTypes {
+ get {
+ return ResourceManager.GetString("ClientType_KeysMustBeSimpleTypes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} has key properties declared at different levels within its type hierarchy..
+ ///
+ internal static string ClientType_KeysOnDifferentDeclaredType {
+ get {
+ return ResourceManager.GetString("ClientType_KeysOnDifferentDeclaredType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Type '{0}' has a MediaEntry attribute that references a property called '{1}'. However, this type does not have a property '{1}'..
+ ///
+ internal static string ClientType_MissingMediaEntryProperty {
+ get {
+ return ResourceManager.GetString("ClientType_MissingMediaEntryProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Type '{0}' has a MimeTypeProperty attribute that references the data property '{1}'. However, this type does not have a property '{1}'..
+ ///
+ internal static string ClientType_MissingMimeTypeDataProperty {
+ get {
+ return ResourceManager.GetString("ClientType_MissingMimeTypeDataProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Type '{0}' has a MimeTypeProperty attribute that references the MIME type property '{1}'. However, this type does not have a property '{1}'..
+ ///
+ internal static string ClientType_MissingMimeTypeProperty {
+ get {
+ return ResourceManager.GetString("ClientType_MissingMimeTypeProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The open object property '{0}:{1}' is not defined..
+ ///
+ internal static string ClientType_MissingOpenProperty {
+ get {
+ return ResourceManager.GetString("ClientType_MissingOpenProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The closed type {0} does not have a corresponding {1} settable property..
+ ///
+ internal static string ClientType_MissingProperty {
+ get {
+ return ResourceManager.GetString("ClientType_MissingProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Multiple implementations of ICollection<T> is not supported..
+ ///
+ internal static string ClientType_MultipleImplementationNotSupported {
+ get {
+ return ResourceManager.GetString("ClientType_MultipleImplementationNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} has multiple definitions for OpenObjectAttribute..
+ ///
+ internal static string Clienttype_MultipleOpenProperty {
+ get {
+ return ResourceManager.GetString("Clienttype_MultipleOpenProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Multiple types were found with the same name '{0}'. Type names must be unique..
+ ///
+ internal static string ClientType_MultipleTypesWithSameName {
+ get {
+ return ResourceManager.GetString("ClientType_MultipleTypesWithSameName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The complex type '{0}' has no settable properties..
+ ///
+ internal static string ClientType_NoSettableFields {
+ get {
+ return ResourceManager.GetString("ClientType_NoSettableFields", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The open type property '{0}' returned a null instance..
+ ///
+ internal static string ClientType_NullOpenProperties {
+ get {
+ return ResourceManager.GetString("ClientType_NullOpenProperties", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The type '{0}' is not supported by the client library..
+ ///
+ internal static string ClientType_UnsupportedType {
+ get {
+ return ResourceManager.GetString("ClientType_UnsupportedType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The property '{0}' is of entity type and it cannot be a property of the type '{1}', which is not of entity type. Only entity types can contain navigation properties..
+ ///
+ internal static string ClientTypeCache_NonEntityTypeCannotContainEntityProperties {
+ get {
+ return ResourceManager.GetString("ClientTypeCache_NonEntityTypeCannotContainEntityProperties", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A collection property of primitive types cannot contain an item of a collection type..
+ ///
+ internal static string Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed {
+ get {
+ return ResourceManager.GetString("Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An item in the collection property has a null value. Collection properties that contain items with null values are not supported..
+ ///
+ internal static string Collection_NullCollectionItemsNotSupported {
+ get {
+ return ResourceManager.GetString("Collection_NullCollectionItemsNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The value of the property '{0}' is null. Properties that are a collection type of primitive or complex types cannot be null..
+ ///
+ internal static string Collection_NullCollectionNotSupported {
+ get {
+ return ResourceManager.GetString("Collection_NullCollectionNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0}.{1} must return a non-null open property collection..
+ ///
+ internal static string Collection_NullCollectionReference {
+ get {
+ return ResourceManager.GetString("Collection_NullCollectionReference", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The value of the collection of item type '{0}' is null. A collection cannot have a null value..
+ ///
+ internal static string Collection_NullNonPropertyCollectionNotSupported {
+ get {
+ return ResourceManager.GetString("Collection_NullNonPropertyCollectionNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A collection property of complex types cannot contain an item of a primitive type..
+ ///
+ internal static string Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed {
+ get {
+ return ResourceManager.GetString("Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This operation requires the entity to be of an Entity Type, either mark its key properties, or attribute the class with DataServiceEntityAttribute.
+ ///
+ internal static string Content_EntityIsNotEntityType {
+ get {
+ return ResourceManager.GetString("Content_EntityIsNotEntityType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This operation requires the entity be of an Entity Type, and has at least one key property..
+ ///
+ internal static string Content_EntityWithoutKey {
+ get {
+ return ResourceManager.GetString("Content_EntityWithoutKey", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to AddLink and DeleteLink methods only work when the sourceProperty is a collection..
+ ///
+ internal static string Context_AddLinkCollectionOnly {
+ get {
+ return ResourceManager.GetString("Context_AddLinkCollectionOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to AddRelatedObject method only works when the sourceProperty is a collection..
+ ///
+ internal static string Context_AddRelatedObjectCollectionOnly {
+ get {
+ return ResourceManager.GetString("Context_AddRelatedObjectCollectionOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to AddRelatedObject method only works if the source entity is in a non-deleted state..
+ ///
+ internal static string Context_AddRelatedObjectSourceDeleted {
+ get {
+ return ResourceManager.GetString("Context_AddRelatedObjectSourceDeleted", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The asynchronous result has already been completed..
+ ///
+ internal static string Context_AsyncAlreadyDone {
+ get {
+ return ResourceManager.GetString("Context_AsyncAlreadyDone", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Expected an absolute, well formed http URL without a query or fragment..
+ ///
+ internal static string Context_BaseUri {
+ get {
+ return ResourceManager.GetString("Context_BaseUri", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to You must set the BaseUri property before you perform this operation..
+ ///
+ internal static string Context_BaseUriRequired {
+ get {
+ return ResourceManager.GetString("Context_BaseUriRequired", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An error occurred for this query during batch execution. See the inner exception for details..
+ ///
+ internal static string Context_BatchExecuteError {
+ get {
+ return ResourceManager.GetString("Context_BatchExecuteError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Saving entities with the [MediaEntry] attribute is not currently supported in batch mode. Use non-batched mode instead..
+ ///
+ internal static string Context_BatchNotSupportedForMediaLink {
+ get {
+ return ResourceManager.GetString("Context_BatchNotSupportedForMediaLink", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Changes cannot be saved as a batch when an entity has one or more streams associated with it. Retry the SaveChanges operation without enabling the SaveChangesOptions.BatchWithSingleChangeset and the SaveChangesOptions.BatchWithIndependentOperations options..
+ ///
+ internal static string Context_BatchNotSupportedForNamedStreams {
+ get {
+ return ResourceManager.GetString("Context_BatchNotSupportedForNamedStreams", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to OperationParameter of type BodyOperationParameter cannot be specified when the HttpMethod is set to GET..
+ ///
+ internal static string Context_BodyOperationParametersNotAllowedWithGet {
+ get {
+ return ResourceManager.GetString("Context_BodyOperationParametersNotAllowedWithGet", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The response should have both 'Location' and 'OData-EntityId' headers or the response should not have any of these headers..
+ ///
+ internal static string Context_BothLocationAndIdMustBeSpecified {
+ get {
+ return ResourceManager.GetString("Context_BothLocationAndIdMustBeSpecified", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An entity in the 'Added' state cannot be changed to '{0}', it can only be changed to 'Detached'..
+ ///
+ internal static string Context_CannotChangeStateIfAdded {
+ get {
+ return ResourceManager.GetString("Context_CannotChangeStateIfAdded", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The ChangeState method does not support the 'Added' state because additional information is needed for inserts. Use either AddObject or AddRelatedObject instead..
+ ///
+ internal static string Context_CannotChangeStateToAdded {
+ get {
+ return ResourceManager.GetString("Context_CannotChangeStateToAdded", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The entity's state can only be changed to 'Modified' if it is currently 'Unchanged'..
+ ///
+ internal static string Context_CannotChangeStateToModifiedIfNotUnchanged {
+ get {
+ return ResourceManager.GetString("Context_CannotChangeStateToModifiedIfNotUnchanged", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to convert value '{0}' into a key string for a URI..
+ ///
+ internal static string Context_CannotConvertKey {
+ get {
+ return ResourceManager.GetString("Context_CannotConvertKey", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Attempt to delete a link between two objects failed because the identity of the target object of the link depends on the source object of the link..
+ ///
+ internal static string Context_ChildResourceExists {
+ get {
+ return ResourceManager.GetString("Context_ChildResourceExists", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The ContentType value for a named stream cannot be null or an empty string..
+ ///
+ internal static string Context_ContentTypeRequiredForNamedStream {
+ get {
+ return ResourceManager.GetString("Context_ContentTypeRequiredForNamedStream", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to For deep insert, ChangeState for '{0}' cannot be Deleted or Modified..
+ ///
+ internal static string Context_DeepInsertDeletedOrModified {
+ get {
+ return ResourceManager.GetString("Context_DeepInsertDeletedOrModified", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Deep insert can only have one top level entity..
+ ///
+ internal static string Context_DeepInsertOneTopLevelEntity {
+ get {
+ return ResourceManager.GetString("Context_DeepInsertOneTopLevelEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The current object did not originate the async result..
+ ///
+ internal static string Context_DidNotOriginateAsync {
+ get {
+ return ResourceManager.GetString("Context_DidNotOriginateAsync", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context is already tracking a different entity with the same resource Uri..
+ ///
+ internal static string Context_DifferentEntityAlreadyContained {
+ get {
+ return ResourceManager.GetString("Context_DifferentEntityAlreadyContained", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Multiple body operation parameters were found with the same name. Body operation parameter names must be unique..
+ ///
+ internal static string Context_DuplicateBodyOperationParameterName {
+ get {
+ return ResourceManager.GetString("Context_DuplicateBodyOperationParameterName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Multiple uri operation parameters were found with the same name. Uri operation parameter names must be unique..
+ ///
+ internal static string Context_DuplicateUriOperationParameterName {
+ get {
+ return ResourceManager.GetString("Context_DuplicateUriOperationParameterName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to EndExecute overload for void service operations and actions received a non-void response from the server..
+ ///
+ internal static string Context_EndExecuteExpectedVoidResponse {
+ get {
+ return ResourceManager.GetString("Context_EndExecuteExpectedVoidResponse", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context is already tracking the entity..
+ ///
+ internal static string Context_EntityAlreadyContained {
+ get {
+ return ResourceManager.GetString("Context_EntityAlreadyContained", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The entity does not have a stream named '{0}'. Make sure that the name of the stream is correct..
+ ///
+ internal static string Context_EntityDoesNotContainNamedStream {
+ get {
+ return ResourceManager.GetString("Context_EntityDoesNotContainNamedStream", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context is in non tracking mode, The entity does not seem to have the media links populated properly. Please verify server response is correct and that the entity extends BaseEntityType..
+ ///
+ internal static string Context_EntityInNonTrackedContextLacksMediaLinks {
+ get {
+ return ResourceManager.GetString("Context_EntityInNonTrackedContextLacksMediaLinks", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context is currently in no tracking mode, in order to use streams make sure your entities extend BaseEntityType and query the Item again from the server to populate the read link or enable tracking..
+ ///
+ internal static string Context_EntityMediaLinksNotTrackedInEntity {
+ get {
+ return ResourceManager.GetString("Context_EntityMediaLinksNotTrackedInEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An implementation of ODataEntityMetadataBuilder is required, but a null value was returned from GetEntityMetadataBuilder..
+ ///
+ internal static string Context_EntityMetadataBuilderIsRequired {
+ get {
+ return ResourceManager.GetString("Context_EntityMetadataBuilderIsRequired", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context is not currently tracking the entity..
+ ///
+ internal static string Context_EntityNotContained {
+ get {
+ return ResourceManager.GetString("Context_EntityNotContained", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This operation requires that the specified entity be a Media Link Entry and that the ReadStreamUri be available. However, the specified entity either is not a Media Link Entry or does not have a valid ReadStreamUri value. If the entity is a Media Link Entry, re-query the data service for this entity to obtain a valid ReadStreamUri value..
+ ///
+ internal static string Context_EntityNotMediaLinkEntry {
+ get {
+ return ResourceManager.GetString("Context_EntityNotMediaLinkEntry", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Expected a relative URL path without query or fragment..
+ ///
+ internal static string Context_EntitySetName {
+ get {
+ return ResourceManager.GetString("Context_EntitySetName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Execute overload for void service operations and actions received a non-void response from the server..
+ ///
+ internal static string Context_ExecuteExpectedVoidResponse {
+ get {
+ return ResourceManager.GetString("Context_ExecuteExpectedVoidResponse", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The HttpMethod must be GET, POST or DELETE..
+ ///
+ internal static string Context_ExecuteExpectsGetOrPostOrDelete {
+ get {
+ return ResourceManager.GetString("Context_ExecuteExpectsGetOrPostOrDelete", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Microsoft.OData.Client internal error {0}..
+ ///
+ internal static string Context_InternalError {
+ get {
+ return ResourceManager.GetString("Context_InternalError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to One of the link's resources failed to insert..
+ ///
+ internal static string Context_LinkResourceInsertFailure {
+ get {
+ return ResourceManager.GetString("Context_LinkResourceInsertFailure", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The 'Location' header value specified in the response must be an absolute URI..
+ ///
+ internal static string Context_LocationHeaderExpectsAbsoluteUri {
+ get {
+ return ResourceManager.GetString("Context_LocationHeaderExpectsAbsoluteUri", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The Name property of an OperationParameter must be set to a non-null, non-empty string..
+ ///
+ internal static string Context_MissingOperationParameterName {
+ get {
+ return ResourceManager.GetString("Context_MissingOperationParameterName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to There is no self-link or edit-media link for the stream named '{0}'. Make sure that either the self-link or edit-media link is specified for this stream..
+ ///
+ internal static string Context_MissingSelfAndEditLinkForNamedStream {
+ get {
+ return ResourceManager.GetString("Context_MissingSelfAndEditLinkForNamedStream", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The entity type {0} is marked with MediaEntry attribute but no save stream was set for the entity..
+ ///
+ internal static string Context_MLEWithoutSaveStream {
+ get {
+ return ResourceManager.GetString("Context_MLEWithoutSaveStream", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to '{0}' must be used with '{1}'..
+ ///
+ internal static string Context_MustBeUsedWith {
+ get {
+ return ResourceManager.GetString("Context_MustBeUsedWith", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Media link object of type '{0}' is configured to use the MIME type specified in the property '{1}'. However, that property's value is null or empty..
+ ///
+ internal static string Context_NoContentTypeForMediaLink {
+ get {
+ return ResourceManager.GetString("Context_NoContentTypeForMediaLink", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context can not load the related collection or reference for objects in the added state..
+ ///
+ internal static string Context_NoLoadWithInsertEnd {
+ get {
+ return ResourceManager.GetString("Context_NoLoadWithInsertEnd", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to One or both of the ends of the relationship is in the deleted state..
+ ///
+ internal static string Context_NoRelationWithDeleteEnd {
+ get {
+ return ResourceManager.GetString("Context_NoRelationWithDeleteEnd", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to One or both of the ends of the relationship is in the added state..
+ ///
+ internal static string Context_NoRelationWithInsertEnd {
+ get {
+ return ResourceManager.GetString("Context_NoRelationWithInsertEnd", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The operation parameters array contains a null element which is not allowed..
+ ///
+ internal static string Context_NullElementInOperationParameterArray {
+ get {
+ return ResourceManager.GetString("Context_NullElementInOperationParameterArray", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The serialized resource has a null value in key member '{0}'. Null values are not supported in key members..
+ ///
+ internal static string Context_NullKeysAreNotSupported {
+ get {
+ return ResourceManager.GetString("Context_NullKeysAreNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property must not return a null value. Please return a non-null value for this property..
+ ///
+ internal static string Context_OnMessageCreatingReturningNull {
+ get {
+ return ResourceManager.GetString("Context_OnMessageCreatingReturningNull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The operation has been canceled..
+ ///
+ internal static string Context_OperationCanceled {
+ get {
+ return ResourceManager.GetString("Context_OperationCanceled", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The property '{0}' is not supported when MaxProtocolVersion is greater than '{1}'..
+ ///
+ internal static string Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX {
+ get {
+ return ResourceManager.GetString("Context_PropertyNotSupportedForMaxDataServiceVersionGreaterThanX", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The context is already tracking the relationship..
+ ///
+ internal static string Context_RelationAlreadyContained {
+ get {
+ return ResourceManager.GetString("Context_RelationAlreadyContained", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The sourceProperty is not a reference or collection of the target's object type..
+ ///
+ internal static string Context_RelationNotRefOrCollection {
+ get {
+ return ResourceManager.GetString("Context_RelationNotRefOrCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Because the requestUri is a relative Uri, you must set the BaseUri property on the DataServiceContext..
+ ///
+ internal static string Context_RequestUriIsRelativeBaseUriRequired {
+ get {
+ return ResourceManager.GetString("Context_RequestUriIsRelativeBaseUriRequired", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The request requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the higher version, and then retry the operation..
+ ///
+ internal static string Context_RequestVersionIsBiggerThanProtocolVersion {
+ get {
+ return ResourceManager.GetString("Context_RequestVersionIsBiggerThanProtocolVersion", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The ResolveEntitySet function must return a non-null Uri for the EntitySet '{0}', otherwise you must set the BaseUri property..
+ ///
+ internal static string Context_ResolveEntitySetOrBaseUriRequired {
+ get {
+ return ResourceManager.GetString("Context_ResolveEntitySetOrBaseUriRequired", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The Uri that is returned by the ResolveEntitySet function must be an absolute, well-formed URL with an "http" or "https" scheme name and without any query strings or fragment identifiers..
+ ///
+ internal static string Context_ResolveReturnedInvalidUri {
+ get {
+ return ResourceManager.GetString("Context_ResolveReturnedInvalidUri", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The response version is {0}, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the version required by the response, and then retry the request. If the client does not support the required protocol version, then upgrade the client..
+ ///
+ internal static string Context_ResponseVersionIsBiggerThanProtocolVersion {
+ get {
+ return ResourceManager.GetString("Context_ResponseVersionIsBiggerThanProtocolVersion", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SendingRequest cannot be used in combination with the DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property. Please use SendingRequest2 with DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property instead..
+ ///
+ internal static string Context_SendingRequest_InvalidWhenUsingOnMessageCreating {
+ get {
+ return ResourceManager.GetString("Context_SendingRequest_InvalidWhenUsingOnMessageCreating", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only instances of HttpWebRequest are currently allowed for this property. Other subtypes of WebRequest are not supported..
+ ///
+ internal static string Context_SendingRequestEventArgsNotHttp {
+ get {
+ return ResourceManager.GetString("Context_SendingRequestEventArgsNotHttp", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SetLink method only works when the sourceProperty is not a collection..
+ ///
+ internal static string Context_SetLinkReferenceOnly {
+ get {
+ return ResourceManager.GetString("Context_SetLinkReferenceOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SetRelatedObjectLink method only works when the sourceProperty is not a collection..
+ ///
+ internal static string Context_SetRelatedObjectLinkNonCollectionOnly {
+ get {
+ return ResourceManager.GetString("Context_SetRelatedObjectLinkNonCollectionOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SetRelatedObjectLink method only works if the source entity is in a non-deleted state..
+ ///
+ internal static string Context_SetRelatedObjectLinkSourceDeleted {
+ get {
+ return ResourceManager.GetString("Context_SetRelatedObjectLinkSourceDeleted", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SetRelatedObject method only works when the sourceProperty is not a collection..
+ ///
+ internal static string Context_SetRelatedObjectNonCollectionOnly {
+ get {
+ return ResourceManager.GetString("Context_SetRelatedObjectNonCollectionOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SetRelatedObject method only works if the source entity is in a non-deleted state..
+ ///
+ internal static string Context_SetRelatedObjectSourceDeleted {
+ get {
+ return ResourceManager.GetString("Context_SetRelatedObjectSourceDeleted", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Calling SetSaveStream on an entity with state '{0}' is not allowed..
+ ///
+ internal static string Context_SetSaveStreamOnInvalidEntityState {
+ get {
+ return ResourceManager.GetString("Context_SetSaveStreamOnInvalidEntityState", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Can't use SetSaveStream on entity with type {0} which has a media entry property defined..
+ ///
+ internal static string Context_SetSaveStreamOnMediaEntryProperty {
+ get {
+ return ResourceManager.GetString("Context_SetSaveStreamOnMediaEntryProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to There is no edit-media link for the entity's media stream. Make sure that the edit-media link is specified for this stream..
+ ///
+ internal static string Context_SetSaveStreamWithoutEditMediaLink {
+ get {
+ return ResourceManager.GetString("Context_SetSaveStreamWithoutEditMediaLink", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The stream named '{0}' cannot be modified because it does not have an edit-media link. Make sure that the stream name is correct and that an edit-media link for this stream is included in the entry element in the response..
+ ///
+ internal static string Context_SetSaveStreamWithoutNamedStreamEditLink {
+ get {
+ return ResourceManager.GetString("Context_SetSaveStreamWithoutNamedStreamEditLink", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The identity value specified by either the the OData-EntityId header must be an absolute URI..
+ ///
+ internal static string Context_TrackingExpectsAbsoluteUri {
+ get {
+ return ResourceManager.GetString("Context_TrackingExpectsAbsoluteUri", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected result (<= 0) from stream.Read() while reading raw data for this property..
+ ///
+ internal static string Context_UnexpectedZeroRawRead {
+ get {
+ return ResourceManager.GetString("Context_UnexpectedZeroRawRead", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to UpdateRelatedObject method only works when the sourceProperty is not collection..
+ ///
+ internal static string Context_UpdateRelatedObjectNonCollectionOnly {
+ get {
+ return ResourceManager.GetString("Context_UpdateRelatedObjectNonCollectionOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Response version '{0}' is not supported. The only supported versions are: {1}..
+ ///
+ internal static string Context_VersionNotSupported {
+ get {
+ return ResourceManager.GetString("Context_VersionNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A value provided during '{0}' operation on DataServiceCollection is not of an entity type with key..
+ ///
+ internal static string DataBinding_BindingOperation_ArrayItemNotEntity {
+ get {
+ return ResourceManager.GetString("DataBinding_BindingOperation_ArrayItemNotEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Null values are disallowed during '{0}' operations on DataServiceCollection..
+ ///
+ internal static string DataBinding_BindingOperation_ArrayItemNull {
+ get {
+ return ResourceManager.GetString("DataBinding_BindingOperation_ArrayItemNull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Add/Update/Delete operation cannot be performed on a child entity, if the parent entity is already detached..
+ ///
+ internal static string DataBinding_BindingOperation_DetachedSource {
+ get {
+ return ResourceManager.GetString("DataBinding_BindingOperation_DetachedSource", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An attempt to track a collection object of type '{0}' failed because the collection object is already being tracked..
+ ///
+ internal static string DataBinding_CollectionAssociatedWithMultipleEntities {
+ get {
+ return ResourceManager.GetString("DataBinding_CollectionAssociatedWithMultipleEntities", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected action '{0}' on the OnCollectionChanged event raised by a collection object of type '{1}'..
+ ///
+ internal static string DataBinding_CollectionChangedUnknownActionCollection {
+ get {
+ return ResourceManager.GetString("DataBinding_CollectionChangedUnknownActionCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property '{0}' for entity type '{1}'..
+ ///
+ internal static string DataBinding_CollectionPropertySetterValueHasObserver {
+ get {
+ return ResourceManager.GetString("DataBinding_CollectionPropertySetterValueHasObserver", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An attempt to track a complex object of type '{0}' failed because the complex object is already being tracked..
+ ///
+ internal static string DataBinding_ComplexObjectAssociatedWithMultipleEntities {
+ get {
+ return ResourceManager.GetString("DataBinding_ComplexObjectAssociatedWithMultipleEntities", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The DataServiceCollection to be tracked must contain entity typed elements with at least one key property. The element type '{0}' does not have any key property..
+ ///
+ internal static string DataBinding_DataServiceCollectionArgumentMustHaveEntityType {
+ get {
+ return ResourceManager.GetString("DataBinding_DataServiceCollectionArgumentMustHaveEntityType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unexpected action '{0}' on the OnCollectionChanged event raised by DataServiceCollection..
+ ///
+ internal static string DataBinding_DataServiceCollectionChangedUnknownActionCollection {
+ get {
+ return ResourceManager.GetString("DataBinding_DataServiceCollectionChangedUnknownActionCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An attempt was made to add entity of type '{0}' to a collection in which the same entity already exists..
+ ///
+ internal static string DataBinding_EntityAlreadyInCollection {
+ get {
+ return ResourceManager.GetString("DataBinding_EntityAlreadyInCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An attempt to track an entity or complex type failed because the entity or complex type contains a collection property of type '{0}' that does not implement the INotifyCollectionChanged interface..
+ ///
+ internal static string DataBinding_NotifyCollectionChangedNotImpl {
+ get {
+ return ResourceManager.GetString("DataBinding_NotifyCollectionChangedNotImpl", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An attempt to track an entity or complex type failed because the entity or complex type '{0}' does not implement the INotifyPropertyChanged interface..
+ ///
+ internal static string DataBinding_NotifyPropertyChangedNotImpl {
+ get {
+ return ResourceManager.GetString("DataBinding_NotifyPropertyChangedNotImpl", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Entity set name has not been provided for an entity of type '{0}'..
+ ///
+ internal static string DataBinding_Util_UnknownEntitySetName {
+ get {
+ return ResourceManager.GetString("DataBinding_Util_UnknownEntitySetName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to When you call the UseJson method without a parameter, you must use the LoadServiceModel property to provide a valid IEdmModel instance..
+ ///
+ internal static string DataServiceClientFormat_LoadServiceModelRequired {
+ get {
+ return ResourceManager.GetString("DataServiceClientFormat_LoadServiceModelRequired", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to To use the JSON format, you must first call DataServiceContext.Format.UseJson() and supply a valid service model..
+ ///
+ internal static string DataServiceClientFormat_ValidServiceModelRequiredForJson {
+ get {
+ return ResourceManager.GetString("DataServiceClientFormat_ValidServiceModelRequiredForJson", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The DataServiceContext to which the DataServiceCollection instance belongs could not be determined. The DataServiceContext must either be supplied in the DataServiceCollection constructor or be used to create the DataServiceQuery or QueryOperationResponse object that is the source of the items in the DataServiceCollection..
+ ///
+ internal static string DataServiceCollection_CannotDetermineContextFromItems {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_CannotDetermineContextFromItems", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The tracking of DataServiceCollection can not be stopped for child collections..
+ ///
+ internal static string DataServiceCollection_CannotStopTrackingChildCollection {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_CannotStopTrackingChildCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An item could not be added to the collection. When items in a DataServiceCollection are tracked by the DataServiceContext, new items cannot be added before items have been loaded into the collection..
+ ///
+ internal static string DataServiceCollection_InsertIntoTrackedButNotLoadedCollection {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_InsertIntoTrackedButNotLoadedCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The LoadAsync method cannot be called when the DataServiceCollection is not a child collection of a related entity..
+ ///
+ internal static string DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_LoadAsyncNoParamsWithoutParentEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only a typed DataServiceQuery object can be supplied when calling the LoadAsync method on DataServiceCollection..
+ ///
+ internal static string DataServiceCollection_LoadAsyncRequiresDataServiceQuery {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_LoadAsyncRequiresDataServiceQuery", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Target collection for the Load operation must have an associated DataServiceContext..
+ ///
+ internal static string DataServiceCollection_LoadRequiresTargetCollectionObserved {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_LoadRequiresTargetCollectionObserved", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A previous LoadAsync operation has not yet completed. You cannot call the LoadAsync method on the DataServiceCollection again until the previous operation has completed..
+ ///
+ internal static string DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_MultipleLoadAsyncOperationsAtTheSameTime", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This operation is only supported on collections that are being tracked..
+ ///
+ internal static string DataServiceCollection_OperationForTrackedOnly {
+ get {
+ return ResourceManager.GetString("DataServiceCollection_OperationForTrackedOnly", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An error occurred while processing this request..
+ ///
+ internal static string DataServiceException_GeneralError {
+ get {
+ return ResourceManager.GetString("DataServiceException_GeneralError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This target framework does not enable you to directly enumerate over a data service query. This is because enumeration automatically sends a synchronous request to the data service. Because this framework only supports asynchronous operations, you must instead call the BeginExecute and EndExecute methods to obtain a query result that supports enumeration..
+ ///
+ internal static string DataServiceQuery_EnumerationNotSupported {
+ get {
+ return ResourceManager.GetString("DataServiceQuery_EnumerationNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Failed to get the count value from the server..
+ ///
+ internal static string DataServiceRequest_FailGetCount {
+ get {
+ return ResourceManager.GetString("DataServiceRequest_FailGetCount", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Failed to get the value from the server..
+ ///
+ internal static string DataServiceRequest_FailGetValue {
+ get {
+ return ResourceManager.GetString("DataServiceRequest_FailGetValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The current value '{1}' type is not compatible with the expected '{0}' type..
+ ///
+ internal static string Deserialize_Current {
+ get {
+ return ResourceManager.GetString("Deserialize_Current", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. The XML element contains mixed content..
+ ///
+ internal static string Deserialize_ExpectingSimpleValue {
+ get {
+ return ResourceManager.GetString("Deserialize_ExpectingSimpleValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Only a single enumeration is supported by this IEnumerable..
+ ///
+ internal static string Deserialize_GetEnumerator {
+ get {
+ return ResourceManager.GetString("Deserialize_GetEnumerator", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. Payload has an entry and the property '{0}' is a collection..
+ ///
+ internal static string Deserialize_MismatchEntryLinkEntryPropertyIsCollection {
+ get {
+ return ResourceManager.GetString("Deserialize_MismatchEntryLinkEntryPropertyIsCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. Payload has a feed and the property '{0}' is not a collection..
+ ///
+ internal static string Deserialize_MismatchEntryLinkFeedPropertyNotCollection {
+ get {
+ return ResourceManager.GetString("Deserialize_MismatchEntryLinkFeedPropertyNotCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. Payload has a link, local object has a simple value..
+ ///
+ internal static string Deserialize_MismatchEntryLinkLocalSimple {
+ get {
+ return ResourceManager.GetString("Deserialize_MismatchEntryLinkLocalSimple", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. Missing id element in the response..
+ ///
+ internal static string Deserialize_MissingIdElement {
+ get {
+ return ResourceManager.GetString("Deserialize_MissingIdElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. Element value interspersed with a comment is not supported..
+ ///
+ internal static string Deserialize_MixedTextWithComment {
+ get {
+ return ResourceManager.GetString("Deserialize_MixedTextWithComment", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The response to this POST request did not contain a 'location' header. That is not supported by this client..
+ ///
+ internal static string Deserialize_NoLocationHeader {
+ get {
+ return ResourceManager.GetString("Deserialize_NoLocationHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error processing response stream. Server failed with following message:\r\n{0}.
+ ///
+ internal static string Deserialize_ServerException {
+ get {
+ return ResourceManager.GetString("Deserialize_ServerException", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DataServiceKey attribute must specify at least one property name..
+ ///
+ internal static string DSKAttribute_MustSpecifyAtleastOnePropertyName {
+ get {
+ return ResourceManager.GetString("DSKAttribute_MustSpecifyAtleastOnePropertyName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A value with primitive kind '{0}' cannot be converted into a primitive object value..
+ ///
+ internal static string EdmValueUtils_CannotConvertTypeToClrValue {
+ get {
+ return ResourceManager.GetString("EdmValueUtils_CannotConvertTypeToClrValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'..
+ ///
+ internal static string EdmValueUtils_IncorrectPrimitiveTypeKind {
+ get {
+ return ResourceManager.GetString("EdmValueUtils_IncorrectPrimitiveTypeKind", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'..
+ ///
+ internal static string EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName {
+ get {
+ return ResourceManager.GetString("EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type..
+ ///
+ internal static string EdmValueUtils_UnsupportedPrimitiveType {
+ get {
+ return ResourceManager.GetString("EdmValueUtils_UnsupportedPrimitiveType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The entity with identity '{0}' does not have a self-link or an edit-link associated with it. Please make sure that the entity has either a self-link or an edit-link associated with it..
+ ///
+ internal static string EntityDescriptor_MissingSelfEditLink {
+ get {
+ return ResourceManager.GetString("EntityDescriptor_MissingSelfEditLink", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An internal error '{0}' occurred..
+ ///
+ internal static string General_InternalError {
+ get {
+ return ResourceManager.GetString("General_InternalError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Value for MIME type parameter '{0}' is incorrect because the closing quote character could not be found while the parameter value started with a quote character..
+ ///
+ internal static string HttpProcessUtility_ClosingQuoteNotFound {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_ClosingQuoteNotFound", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Content-Type header value missing..
+ ///
+ internal static string HttpProcessUtility_ContentTypeMissing {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_ContentTypeMissing", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Character set '{0}' is not supported..
+ ///
+ internal static string HttpProcessUtility_EncodingNotSupported {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_EncodingNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Value for MIME type parameter '{0}' is incorrect because it terminated with escape character. Escape characters must always be followed by a character in a parameter value..
+ ///
+ internal static string HttpProcessUtility_EscapeCharAtEnd {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_EscapeCharAtEnd", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Value for MIME type parameter '{0}' is incorrect because it contained escape characters even though it was not quoted..
+ ///
+ internal static string HttpProcessUtility_EscapeCharWithoutQuotes {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_EscapeCharWithoutQuotes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Media type is missing a parameter value..
+ ///
+ internal static string HttpProcessUtility_MediaTypeMissingValue {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_MediaTypeMissingValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Media type requires a ';' character before a parameter definition..
+ ///
+ internal static string HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_MediaTypeRequiresSemicolonBeforeParameter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Media type requires a '/' character..
+ ///
+ internal static string HttpProcessUtility_MediaTypeRequiresSlash {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_MediaTypeRequiresSlash", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Media type requires a subtype definition..
+ ///
+ internal static string HttpProcessUtility_MediaTypeRequiresSubType {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_MediaTypeRequiresSubType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Media type is unspecified..
+ ///
+ internal static string HttpProcessUtility_MediaTypeUnspecified {
+ get {
+ return ResourceManager.GetString("HttpProcessUtility_MediaTypeUnspecified", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The collection is not part of the current entry.
+ ///
+ internal static string MaterializeFromObject_CollectionKeyNotPresentInLinkTable {
+ get {
+ return ResourceManager.GetString("MaterializeFromObject_CollectionKeyNotPresentInLinkTable", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Count value is not part of the response stream..
+ ///
+ internal static string MaterializeFromObject_CountNotPresent {
+ get {
+ return ResourceManager.GetString("MaterializeFromObject_CountNotPresent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This response does not contain any nested collections. Use null as Key instead..
+ ///
+ internal static string MaterializeFromObject_GetNestLinkForFlatCollection {
+ get {
+ return ResourceManager.GetString("MaterializeFromObject_GetNestLinkForFlatCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The top level link is only available after the response has been enumerated..
+ ///
+ internal static string MaterializeFromObject_TopLevelLinkNotAvailable {
+ get {
+ return ResourceManager.GetString("MaterializeFromObject_TopLevelLinkNotAvailable", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The null value from property '{0}' cannot be assigned to a type '{1}'..
+ ///
+ internal static string Materializer_CannotAssignNull {
+ get {
+ return ResourceManager.GetString("Materializer_CannotAssignNull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Materialization of top level collection expected ICollection <T>, but actual type was {0}..
+ ///
+ internal static string Materializer_CollectionExpectedCollection {
+ get {
+ return ResourceManager.GetString("Materializer_CollectionExpectedCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A DataServiceCollection can only contain entity types. Primitive and complex types cannot be contained by this kind of collection..
+ ///
+ internal static string Materializer_DataServiceCollectionNotSupportedForNonEntities {
+ get {
+ return ResourceManager.GetString("Materializer_DataServiceCollectionNotSupportedForNonEntities", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An entry of type '{0}' cannot be added to a collection that contains instances of type '{1}'. This may occur when an existing entry of a different type has the same identity value or when the same entity is projected into two different types in a single query..
+ ///
+ internal static string Materializer_EntryIntoCollectionMismatch {
+ get {
+ return ResourceManager.GetString("Materializer_EntryIntoCollectionMismatch", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An entry returned by the navigation property '{0}' is null and cannot be initialized. You should check for a null value before accessing this property..
+ ///
+ internal static string Materializer_EntryToAccessIsNull {
+ get {
+ return ResourceManager.GetString("Materializer_EntryToAccessIsNull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An entry that contains the data required to create an instance of type '{0}' is null and cannot be initialized. You should check for a null value before accessing this entry..
+ ///
+ internal static string Materializer_EntryToInitializeIsNull {
+ get {
+ return ResourceManager.GetString("Materializer_EntryToInitializeIsNull", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The element '{0}' is not a valid collection item. The name of the collection item element must be 'element' and must belong to the 'http://docs.oasis-open.org/odata/ns/data' namespace..
+ ///
+ internal static string Materializer_InvalidCollectionItem {
+ get {
+ return ResourceManager.GetString("Materializer_InvalidCollectionItem", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The response content type '{0}' is not currently supported..
+ ///
+ internal static string Materializer_InvalidContentTypeEncountered {
+ get {
+ return ResourceManager.GetString("Materializer_InvalidContentTypeEncountered", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to There is a type mismatch between the client and the service. Type '{0}' is an entity type, but the type in the response payload does not represent an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client..
+ ///
+ internal static string Materializer_InvalidEntityType {
+ get {
+ return ResourceManager.GetString("Materializer_InvalidEntityType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to There is a type mismatch between the client and the service. Type '{0}' is not an entity type, but the type in the response payload represents an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client..
+ ///
+ internal static string Materializer_InvalidNonEntityType {
+ get {
+ return ResourceManager.GetString("Materializer_InvalidNonEntityType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The response payload is a not a valid response payload. Please make sure that the top level element is a valid JSON element or belongs to '{0}' namespace..
+ ///
+ internal static string Materializer_InvalidResponsePayload {
+ get {
+ return ResourceManager.GetString("Materializer_InvalidResponsePayload", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot materialize the results into a collection type '{0}' because it does not have a parameterless constructor..
+ ///
+ internal static string Materializer_MaterializationTypeError {
+ get {
+ return ResourceManager.GetString("Materializer_MaterializationTypeError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Collection property '{0}' cannot be created because the type '{1}' does not have a public parameterless constructor..
+ ///
+ internal static string Materializer_NoParameterlessCtorForCollectionProperty {
+ get {
+ return ResourceManager.GetString("Materializer_NoParameterlessCtorForCollectionProperty", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An entity of type '{0}' cannot be projected because there is already an instance of type '{1}' for '{2}'..
+ ///
+ internal static string Materializer_ProjectEntityTypeMismatch {
+ get {
+ return ResourceManager.GetString("Materializer_ProjectEntityTypeMismatch", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The expected property '{0}' could not be found while processing an entry. Check for null before accessing this property..
+ ///
+ internal static string Materializer_PropertyMissing {
+ get {
+ return ResourceManager.GetString("Materializer_PropertyMissing", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property '{0}' is not an entity..
+ ///
+ internal static string Materializer_PropertyNotExpectedEntry {
+ get {
+ return ResourceManager.GetString("Materializer_PropertyNotExpectedEntry", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reset should never be called for collection reader in an internal enumerable..
+ ///
+ internal static string Materializer_ResetAfterEnumeratorCreationError {
+ get {
+ return ResourceManager.GetString("Materializer_ResetAfterEnumeratorCreationError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Cannot materialize a collection of a primitives or complex without the type '{0}' being a collection..
+ ///
+ internal static string Materializer_TypeShouldBeCollectionError {
+ get {
+ return ResourceManager.GetString("Materializer_TypeShouldBeCollectionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required..
+ ///
+ internal static string ODataMetadataBuilder_MissingEntityInstanceUri {
+ get {
+ return ResourceManager.GetString("ODataMetadataBuilder_MissingEntityInstanceUri", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required..
+ ///
+ internal static string ODataMetadataBuilder_MissingEntitySetUri {
+ get {
+ return ResourceManager.GetString("ODataMetadataBuilder_MissingEntitySetUri", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments..
+ ///
+ internal static string ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix {
+ get {
+ return ResourceManager.GetString("ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to GetStream method is not supported..
+ ///
+ internal static string ODataRequestMessage_GetStreamMethodNotSupported {
+ get {
+ return ResourceManager.GetString("ODataRequestMessage_GetStreamMethodNotSupported", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Expected a feed or entry in the response from the server, but found an unexpected element instead..
+ ///
+ internal static string Parser_SingleEntry_ExpectedFeedOrEntry {
+ get {
+ return ResourceManager.GetString("Parser_SingleEntry_ExpectedFeedOrEntry", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Expected exactly one entry in the response from the server, but more than one was found..
+ ///
+ internal static string Parser_SingleEntry_MultipleFound {
+ get {
+ return ResourceManager.GetString("Parser_SingleEntry_MultipleFound", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Expected exactly one entry in the response from the server, but none was found..
+ ///
+ internal static string Parser_SingleEntry_NoneFound {
+ get {
+ return ResourceManager.GetString("Parser_SingleEntry_NoneFound", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The time zone information is missing on the DateTimeOffset value '{0}'. A DateTimeOffset value must contain the time zone information..
+ ///
+ internal static string PlatformHelper_DateTimeOffsetMustContainTimeZone {
+ get {
+ return ResourceManager.GetString("PlatformHelper_DateTimeOffsetMustContainTimeZone", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The operation parameter named '{0}' has a collection item of Edm type kind '{1}'. A collection item must be either a primitive type or a complex Edm type kind..
+ ///
+ internal static string Serializer_InvalidCollectionParameterItemType {
+ get {
+ return ResourceManager.GetString("Serializer_InvalidCollectionParameterItemType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The enum type '{0}' has no member named '{1}'..
+ ///
+ internal static string Serializer_InvalidEnumMemberValue {
+ get {
+ return ResourceManager.GetString("Serializer_InvalidEnumMemberValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The operation parameter named '{0}' was of Edm type kind '{1}'. An operation parameter must be either a primitive type, a complex type or a collection of primitive or complex types..
+ ///
+ internal static string Serializer_InvalidParameterType {
+ get {
+ return ResourceManager.GetString("Serializer_InvalidParameterType", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A circular loop was detected while serializing the property '{0}'. You must make sure that loops are not present in properties that return a collection or complex type..
+ ///
+ internal static string Serializer_LoopsNotAllowedInComplexTypes {
+ get {
+ return ResourceManager.GetString("Serializer_LoopsNotAllowedInComplexTypes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A circular loop was detected while serializing the complex type '{0}'. You must make sure that loops are not present in a collection or a complex type..
+ ///
+ internal static string Serializer_LoopsNotAllowedInNonPropertyComplexTypes {
+ get {
+ return ResourceManager.GetString("Serializer_LoopsNotAllowedInNonPropertyComplexTypes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The operation parameter named '{0}' has a null collection item. The items of a collection must not be null..
+ ///
+ internal static string Serializer_NullCollectionParameterItemValue {
+ get {
+ return ResourceManager.GetString("Serializer_NullCollectionParameterItemValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The parameter alias '{0}' was not present in the request URI. All parameters passed as alias must be present in the request URI..
+ ///
+ internal static string Serializer_UriDoesNotContainParameterAlias {
+ get {
+ return ResourceManager.GetString("Serializer_UriDoesNotContainParameterAlias", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Empty array..
+ ///
+ internal static string Util_EmptyArray {
+ get {
+ return ResourceManager.GetString("Util_EmptyArray", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Empty string..
+ ///
+ internal static string Util_EmptyString {
+ get {
+ return ResourceManager.GetString("Util_EmptyString", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Array contains a null element..
+ ///
+ internal static string Util_NullArrayElement {
+ get {
+ return ResourceManager.GetString("Util_NullArrayElement", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The value '{0}' is not a valid duration value..
+ ///
+ internal static string ValueParser_InvalidDuration {
+ get {
+ return ResourceManager.GetString("ValueParser_InvalidDuration", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to An item in the collection property '{0}' is not of the correct type. All items in the collection property must be of the collection item type..
+ ///
+ internal static string WebUtil_TypeMismatchInCollection {
+ get {
+ return ResourceManager.GetString("WebUtil_TypeMismatchInCollection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A collection of item type '{0}' has an item which is not of the correct type. All items in the collection must be of the collection item type..
+ ///
+ internal static string WebUtil_TypeMismatchInNonPropertyCollection {
+ get {
+ return ResourceManager.GetString("WebUtil_TypeMismatchInNonPropertyCollection", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/Microsoft.OData.Client/SRResources.resx b/src/Microsoft.OData.Client/SRResources.resx
new file mode 100644
index 0000000000..237c14d8a2
--- /dev/null
+++ b/src/Microsoft.OData.Client/SRResources.resx
@@ -0,0 +1,885 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ The expected content type for a batch requests is "multipart/mixed;boundary=batch" not "{0}".
+
+
+ The POST request expected a response with content. ID={0}
+
+
+ Not all requests in the batch had a response.
+
+
+ The web response contained unexpected sections. ID={0}
+
+
+ Expected an absolute, well formed http URL without a query or fragment.
+
+
+ You must set the BaseUri property before you perform this operation.
+
+
+ The Uri that is returned by the ResolveEntitySet function must be an absolute, well-formed URL with an "http" or "https" scheme name and without any query strings or fragment identifiers.
+
+
+ Because the requestUri is a relative Uri, you must set the BaseUri property on the DataServiceContext.
+
+
+ The ResolveEntitySet function must return a non-null Uri for the EntitySet '{0}', otherwise you must set the BaseUri property.
+
+
+ Unable to convert value '{0}' into a key string for a URI.
+
+
+ The identity value specified by either the the OData-EntityId header must be an absolute URI.
+
+
+ The 'Location' header value specified in the response must be an absolute URI.
+
+
+ One of the link's resources failed to insert.
+
+
+ Microsoft.OData.Client internal error {0}.
+
+
+ An error occurred for this query during batch execution. See the inner exception for details.
+
+
+ Expected a relative URL path without query or fragment.
+
+
+ Changes cannot be saved as a batch when an entity has one or more streams associated with it. Retry the SaveChanges operation without enabling the SaveChangesOptions.BatchWithSingleChangeset and the SaveChangesOptions.BatchWithIndependentOperations options.
+
+
+ The stream named '{0}' cannot be modified because it does not have an edit-media link. Make sure that the stream name is correct and that an edit-media link for this stream is included in the entry element in the response.
+
+
+ This operation requires the entity be of an Entity Type, and has at least one key property.
+
+
+ This operation requires the entity to be of an Entity Type, either mark its key properties, or attribute the class with DataServiceEntityAttribute
+
+
+ The context is not currently tracking the entity.
+
+
+ The context is already tracking the entity.
+
+
+ The context is already tracking a different entity with the same resource Uri.
+
+
+ The current object did not originate the async result.
+
+
+ The asynchronous result has already been completed.
+
+
+ The operation has been canceled.
+
+
+ The property '{0}' is not supported when MaxProtocolVersion is greater than '{1}'.
+
+
+ The context can not load the related collection or reference for objects in the added state.
+
+
+ One or both of the ends of the relationship is in the added state.
+
+
+ One or both of the ends of the relationship is in the deleted state.
+
+
+ The context is already tracking the relationship.
+
+
+ The sourceProperty is not a reference or collection of the target's object type.
+
+
+ AddLink and DeleteLink methods only work when the sourceProperty is a collection.
+
+
+ AddRelatedObject method only works when the sourceProperty is a collection.
+
+
+ AddRelatedObject method only works if the source entity is in a non-deleted state.
+
+
+ UpdateRelatedObject method only works when the sourceProperty is not collection.
+
+
+ SetLink method only works when the sourceProperty is not a collection.
+
+
+ SetRelatedObject method only works when the sourceProperty is not a collection.
+
+
+ SetRelatedObject method only works if the source entity is in a non-deleted state.
+
+
+ SetRelatedObjectLink method only works when the sourceProperty is not a collection.
+
+
+ SetRelatedObjectLink method only works if the source entity is in a non-deleted state.
+
+
+ Media link object of type '{0}' is configured to use the MIME type specified in the property '{1}'. However, that property's value is null or empty.
+
+
+ Saving entities with the [MediaEntry] attribute is not currently supported in batch mode. Use non-batched mode instead.
+
+
+ Unexpected result (<= 0) from stream.Read() while reading raw data for this property.
+
+
+ Response version '{0}' is not supported. The only supported versions are: {1}.
+
+
+ The response version is {0}, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the version required by the response, and then retry the request. If the client does not support the required protocol version, then upgrade the client.
+
+
+ The request requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service context is set to {1}. Set the MaxProtocolVersion to the higher version, and then retry the operation.
+
+
+ Attempt to delete a link between two objects failed because the identity of the target object of the link depends on the source object of the link.
+
+
+ The ContentType value for a named stream cannot be null or an empty string.
+
+
+ This operation requires that the specified entity be a Media Link Entry and that the ReadStreamUri be available. However, the specified entity either is not a Media Link Entry or does not have a valid ReadStreamUri value. If the entity is a Media Link Entry, re-query the data service for this entity to obtain a valid ReadStreamUri value.
+
+
+ The entity type {0} is marked with MediaEntry attribute but no save stream was set for the entity.
+
+
+ Can't use SetSaveStream on entity with type {0} which has a media entry property defined.
+
+
+ There is no edit-media link for the entity's media stream. Make sure that the edit-media link is specified for this stream.
+
+
+ Calling SetSaveStream on an entity with state '{0}' is not allowed.
+
+
+ The entity does not have a stream named '{0}'. Make sure that the name of the stream is correct.
+
+
+ There is no self-link or edit-media link for the stream named '{0}'. Make sure that either the self-link or edit-media link is specified for this stream.
+
+
+ The response should have both 'Location' and 'OData-EntityId' headers or the response should not have any of these headers.
+
+
+ OperationParameter of type BodyOperationParameter cannot be specified when the HttpMethod is set to GET.
+
+
+ The Name property of an OperationParameter must be set to a non-null, non-empty string.
+
+
+ Multiple uri operation parameters were found with the same name. Uri operation parameter names must be unique.
+
+
+ Multiple body operation parameters were found with the same name. Body operation parameter names must be unique.
+
+
+ The serialized resource has a null value in key member '{0}'. Null values are not supported in key members.
+
+
+ The HttpMethod must be GET, POST or DELETE.
+
+
+ EndExecute overload for void service operations and actions received a non-void response from the server.
+
+
+ The operation parameters array contains a null element which is not allowed.
+
+
+ An implementation of ODataEntityMetadataBuilder is required, but a null value was returned from GetEntityMetadataBuilder.
+
+
+ The ChangeState method does not support the 'Added' state because additional information is needed for inserts. Use either AddObject or AddRelatedObject instead.
+
+
+ The entity's state can only be changed to 'Modified' if it is currently 'Unchanged'.
+
+
+ An entity in the 'Added' state cannot be changed to '{0}', it can only be changed to 'Detached'.
+
+
+ DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property must not return a null value. Please return a non-null value for this property.
+
+
+ SendingRequest cannot be used in combination with the DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property. Please use SendingRequest2 with DataServiceContext.Configurations.RequestPipeline.OnMessageCreating property instead.
+
+
+ '{0}' must be used with '{1}'.
+
+
+ Deep insert can only have one top level entity.
+
+
+ For deep insert, ChangeState for '{0}' cannot be Deleted or Modified.
+
+
+ When you call the UseJson method without a parameter, you must use the LoadServiceModel property to provide a valid IEdmModel instance.
+
+
+ To use the JSON format, you must first call DataServiceContext.Format.UseJson() and supply a valid service model.
+
+
+ {0}.{1} must return a non-null open property collection.
+
+
+ The open object property '{0}:{1}' is not defined.
+
+
+ {0} has multiple definitions for OpenObjectAttribute.
+
+
+ The closed type {0} does not have a corresponding {1} settable property.
+
+
+ The key property '{0}' on for type '{1}' is of type '{2}', which is not a simple type. Only properties of simple type can be key properties.
+
+
+ {0} has key properties declared at different levels within its type hierarchy.
+
+
+ Type '{0}' has a MimeTypeProperty attribute that references the MIME type property '{1}'. However, this type does not have a property '{1}'.
+
+
+ Type '{0}' has a MimeTypeProperty attribute that references the data property '{1}'. However, this type does not have a property '{1}'.
+
+
+ Type '{0}' has a MediaEntry attribute that references a property called '{1}'. However, this type does not have a property '{1}'.
+
+
+ The complex type '{0}' has no settable properties.
+
+
+ Multiple implementations of ICollection<T> is not supported.
+
+
+ The open type property '{0}' returned a null instance.
+
+
+ Resolving type from '{0}' that inherits from '{1}' is ambiguous.
+
+
+ The type '{0}' is not supported by the client library.
+
+
+ Collection properties of a collection type are not supported.
+
+
+ Multiple types were found with the same name '{0}'. Type names must be unique.
+
+
+ An item in the collection property '{0}' is not of the correct type. All items in the collection property must be of the collection item type.
+
+
+ A collection of item type '{0}' has an item which is not of the correct type. All items in the collection must be of the collection item type.
+
+
+ The property '{0}' is of entity type and it cannot be a property of the type '{1}', which is not of entity type. Only entity types can contain navigation properties.
+
+
+ An error occurred while processing this request.
+
+
+ Only a single enumeration is supported by this IEnumerable.
+
+
+ The current value '{1}' type is not compatible with the expected '{0}' type.
+
+
+ Error processing response stream. Element value interspersed with a comment is not supported.
+
+
+ Error processing response stream. The XML element contains mixed content.
+
+
+ Error processing response stream. Payload has a link, local object has a simple value.
+
+
+ Error processing response stream. Payload has a feed and the property '{0}' is not a collection.
+
+
+ Error processing response stream. Payload has an entry and the property '{0}' is a collection.
+
+
+ The response to this POST request did not contain a 'location' header. That is not supported by this client.
+
+
+ Error processing response stream. Server failed with following message:\r\n{0}
+
+
+ Error processing response stream. Missing id element in the response.
+
+
+ The value of the property '{0}' is null. Properties that are a collection type of primitive or complex types cannot be null.
+
+
+ The value of the collection of item type '{0}' is null. A collection cannot have a null value.
+
+
+ An item in the collection property has a null value. Collection properties that contain items with null values are not supported.
+
+
+ A collection property of primitive types cannot contain an item of a collection type.
+
+
+ A collection property of complex types cannot contain an item of a primitive type.
+
+
+ The entity with identity '{0}' does not have a self-link or an edit-link associated with it. Please make sure that the entity has either a self-link or an edit-link associated with it.
+
+
+ Content-Type header value missing.
+
+
+ Media type is missing a parameter value.
+
+
+ Media type requires a ';' character before a parameter definition.
+
+
+ Media type requires a '/' character.
+
+
+ Media type requires a subtype definition.
+
+
+ Media type is unspecified.
+
+
+ Character set '{0}' is not supported.
+
+
+ Value for MIME type parameter '{0}' is incorrect because it contained escape characters even though it was not quoted.
+
+
+ Value for MIME type parameter '{0}' is incorrect because it terminated with escape character. Escape characters must always be followed by a character in a parameter value.
+
+
+ Value for MIME type parameter '{0}' is incorrect because the closing quote character could not be found while the parameter value started with a quote character.
+
+
+ Count value is not part of the response stream.
+
+
+ The top level link is only available after the response has been enumerated.
+
+
+ The collection is not part of the current entry
+
+
+ This response does not contain any nested collections. Use null as Key instead.
+
+
+ GetStream method is not supported.
+
+
+ Empty string.
+
+
+ Empty array.
+
+
+ Array contains a null element.
+
+
+ The expression type {0} is not supported.
+
+
+ Could not convert constant {0} expression to string.
+
+
+ The method '{0}' is not supported.
+
+
+ The unary operator '{0}' is not supported.
+
+
+ The binary operator '{0}' is not supported.
+
+
+ The constant for '{0}' is not supported.
+
+
+ An operation between an expression and a type is not supported.
+
+
+ The conditional expression is not supported.
+
+
+ The parameter expression is not supported.
+
+
+ The member access of '{0}' is not supported.
+
+
+ Lambda Expressions not supported.
+
+
+ New Expressions not supported.
+
+
+ Member Init Expressions not supported.
+
+
+ List Init Expressions not supported.
+
+
+ New Array Expressions not supported.
+
+
+ Invocation Expressions not supported.
+
+
+ Can only specify query options (orderby, where, take, skip) after last navigation.
+
+
+ Expand query option not allowed.
+
+
+ Can't cast to unsupported type '{0}'
+
+
+ Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type.
+
+
+ Multiple key predicates cannot be specified for the same entity set.
+
+
+ The expression {0} is not supported.
+
+
+ Error translating Linq expression to URI: {0}
+
+
+ Custom query option not allowed.
+
+
+ Can't add duplicate query option '{0}'.
+
+
+ Can't add query option '{0}' because it would conflict with the query options from the translated Linq expression.
+
+
+ Can't add query option '{0}' because it begins with reserved character '$'.
+
+
+ Referencing public field '{0}' not supported in query option expression. Use public property instead.
+
+
+ The query option '{0}' is not supported or is controlled by the OData service.
+
+
+ Cannot specify query options (orderby, where, take, skip, count) on single resource.
+
+
+ The {0} query option cannot be specified after the {1} query option.
+
+
+ Cannot add count option to the resource set.
+
+
+ Cannot add count option to the resource set because it would conflict with existing count options.
+
+
+ Can only specify 'select' query option after last navigation.
+
+
+ Cannot translate multiple Linq Select operations in a single 'select' query option.
+
+
+ Cannot initialize an instance of entity type '{0}' because '{1}' and '{2}' do not refer to the same source entity.
+
+
+ The expression '{0}' is not a valid expression for navigation path. The only supported operations inside the lambda expression body are MemberAccess and TypeAs. The expression must contain at least one MemberAccess and it cannot end with TypeAs.
+
+
+ Initializing instances of the entity type {0} with the expression {1} is not supported.
+
+
+ Constructing or initializing instances of the type {0} with the expression {1} is not supported.
+
+
+ Construction of entity type instances must use object initializer with default constructor.
+
+
+ Referencing of local entity type instances not supported when projecting results.
+
+
+ Cannot assign the value from the {0} property to the {1} property. When projecting results into a entity type, the property names of the source type and the target type must match for the properties being projected.
+
+
+ Can only project the last entity type in the query being translated.
+
+
+ Cannot create projection while there is an explicit expansion specified on the same query.
+
+
+ The collection property '{0}' cannot be used in an 'orderby' query expression. Collection properties are not supported by the 'orderby' query option.
+
+
+ The collection property '{0}' cannot be used in a 'where' query expression. Collection properties are only supported as the source of 'any' or 'all' methods in a 'where' query option.
+
+
+ Navigation to members of the collection property '{0}' in a 'select' query expression is not supported.
+
+
+ The property '{0}' of type 'DataServiceStreamLink' cannot be used in 'where' or 'orderby' query expressions. Properties of type 'DataServiceStreamLink' are not supported by these query options.
+
+
+ The target type for an OfType filter could not be determined.
+
+
+ Non-redundant type filters (OfType <T>, C# 'as' and VB 'TryCast') can only be used once per resource set.
+
+
+ Unsupported expression '{0}' in '{1}' method. Expression cannot end with TypeAs.
+
+
+ The expression 'TypeAs' is not supported when MaxProtocolVersion is less than '3.0'.
+
+
+ The type '{0}' is not an entity type. The target type for a TypeAs operator must be an entity type.
+
+
+ The source parameter for the '{0}' method has to be either a navigation or a collection property.
+
+
+ The method '{0}' is not supported by the 'orderby' query option.
+
+
+ The '$format' query option is not supported. Use the DataServiceContext.Format property to set the desired format.
+
+
+ Found the following illegal system token while building a projection or expansion path: '{0}'
+
+
+ Found a projection as a non-leaf segment in an expand path. Please rephrase your query. The projected property was : '{0}'
+
+
+ Found an illegal type token '{0}' without a trailing navigation property.
+
+
+ The Contains method cannot be used with an empty collection.
+
+
+ The aggregation method '{0}' is not supported.
+
+
+ The expression '{0}' is not a valid aggregate expression. The aggregate expression must evaluate to a single-valued property path to an aggregatable property.
+
+
+ The expression '{0}' is not a valid expression for grouping. The grouping expression must evaluate to a single-valued property path, i.e., a path ending in a single-valued primitive.
+
+
+ The expression '{0}' in the GroupBy key selector is not supported.
+
+
+ DataServiceKey attribute must specify at least one property name.
+
+
+ Target collection for the Load operation must have an associated DataServiceContext.
+
+
+ The tracking of DataServiceCollection can not be stopped for child collections.
+
+
+ This operation is only supported on collections that are being tracked.
+
+
+ The DataServiceContext to which the DataServiceCollection instance belongs could not be determined. The DataServiceContext must either be supplied in the DataServiceCollection constructor or be used to create the DataServiceQuery or QueryOperationResponse object that is the source of the items in the DataServiceCollection.
+
+
+ An item could not be added to the collection. When items in a DataServiceCollection are tracked by the DataServiceContext, new items cannot be added before items have been loaded into the collection.
+
+
+ A previous LoadAsync operation has not yet completed. You cannot call the LoadAsync method on the DataServiceCollection again until the previous operation has completed.
+
+
+ The LoadAsync method cannot be called when the DataServiceCollection is not a child collection of a related entity.
+
+
+ Only a typed DataServiceQuery object can be supplied when calling the LoadAsync method on DataServiceCollection.
+
+
+ The DataServiceCollection to be tracked must contain entity typed elements with at least one key property. The element type '{0}' does not have any key property.
+
+
+ Setting an instance of DataServiceCollection to an entity property is disallowed if the instance is already being tracked. Error occurred on property '{0}' for entity type '{1}'.
+
+
+ Unexpected action '{0}' on the OnCollectionChanged event raised by DataServiceCollection.
+
+
+ Unexpected action '{0}' on the OnCollectionChanged event raised by a collection object of type '{1}'.
+
+
+ Add/Update/Delete operation cannot be performed on a child entity, if the parent entity is already detached.
+
+
+ Null values are disallowed during '{0}' operations on DataServiceCollection.
+
+
+ A value provided during '{0}' operation on DataServiceCollection is not of an entity type with key.
+
+
+ Entity set name has not been provided for an entity of type '{0}'.
+
+
+ An attempt was made to add entity of type '{0}' to a collection in which the same entity already exists.
+
+
+ An attempt to track an entity or complex type failed because the entity or complex type '{0}' does not implement the INotifyPropertyChanged interface.
+
+
+ An attempt to track an entity or complex type failed because the entity or complex type contains a collection property of type '{0}' that does not implement the INotifyCollectionChanged interface.
+
+
+ An attempt to track a complex object of type '{0}' failed because the complex object is already being tracked.
+
+
+ An attempt to track a collection object of type '{0}' failed because the collection object is already being tracked.
+
+
+ Expected exactly one entry in the response from the server, but none was found.
+
+
+ Expected exactly one entry in the response from the server, but more than one was found.
+
+
+ Expected a feed or entry in the response from the server, but found an unexpected element instead.
+
+
+ The null value from property '{0}' cannot be assigned to a type '{1}'.
+
+
+ An entry of type '{0}' cannot be added to a collection that contains instances of type '{1}'. This may occur when an existing entry of a different type has the same identity value or when the same entity is projected into two different types in a single query.
+
+
+ An entry returned by the navigation property '{0}' is null and cannot be initialized. You should check for a null value before accessing this property.
+
+
+ An entry that contains the data required to create an instance of type '{0}' is null and cannot be initialized. You should check for a null value before accessing this entry.
+
+
+ An entity of type '{0}' cannot be projected because there is already an instance of type '{1}' for '{2}'.
+
+
+ The expected property '{0}' could not be found while processing an entry. Check for null before accessing this property.
+
+
+ Property '{0}' is not an entity.
+
+
+ A DataServiceCollection can only contain entity types. Primitive and complex types cannot be contained by this kind of collection.
+
+
+ Collection property '{0}' cannot be created because the type '{1}' does not have a public parameterless constructor.
+
+
+ The element '{0}' is not a valid collection item. The name of the collection item element must be 'element' and must belong to the 'http://docs.oasis-open.org/odata/ns/data' namespace.
+
+
+ There is a type mismatch between the client and the service. Type '{0}' is an entity type, but the type in the response payload does not represent an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client.
+
+
+ There is a type mismatch between the client and the service. Type '{0}' is not an entity type, but the type in the response payload represents an entity type. Please ensure that types defined on the client match the data model of the service, or update the service reference on the client.
+
+
+ Materialization of top level collection expected ICollection <T>, but actual type was {0}.
+
+
+ The response payload is a not a valid response payload. Please make sure that the top level element is a valid JSON element or belongs to '{0}' namespace.
+
+
+ The response content type '{0}' is not currently supported.
+
+
+ Cannot materialize the results into a collection type '{0}' because it does not have a parameterless constructor.
+
+
+ Reset should never be called for collection reader in an internal enumerable.
+
+
+ Cannot materialize a collection of a primitives or complex without the type '{0}' being a collection.
+
+
+ A circular loop was detected while serializing the property '{0}'. You must make sure that loops are not present in properties that return a collection or complex type.
+
+
+ A circular loop was detected while serializing the complex type '{0}'. You must make sure that loops are not present in a collection or a complex type.
+
+
+ The operation parameter named '{0}' has a collection item of Edm type kind '{1}'. A collection item must be either a primitive type or a complex Edm type kind.
+
+
+ The operation parameter named '{0}' has a null collection item. The items of a collection must not be null.
+
+
+ The operation parameter named '{0}' was of Edm type kind '{1}'. An operation parameter must be either a primitive type, a complex type or a collection of primitive or complex types.
+
+
+ The parameter alias '{0}' was not present in the request URI. All parameters passed as alias must be present in the request URI.
+
+
+ The enum type '{0}' has no member named '{1}'.
+
+
+ This target framework does not enable you to directly enumerate over a data service query. This is because enumeration automatically sends a synchronous request to the data service. Because this framework only supports asynchronous operations, you must instead call the BeginExecute and EndExecute methods to obtain a query result that supports enumeration.
+
+
+ Only instances of HttpWebRequest are currently allowed for this property. Other subtypes of WebRequest are not supported.
+
+
+ An internal error '{0}' occurred.
+
+
+ The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required.
+
+
+ The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments.
+
+
+ Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required.
+
+
+ The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type.
+
+
+ Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'.
+
+
+ Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'.
+
+
+ A value with primitive kind '{0}' cannot be converted into a primitive object value.
+
+
+ The value '{0}' is not a valid duration value.
+
+
+ The time zone information is missing on the DateTimeOffset value '{0}'. A DateTimeOffset value must contain the time zone information.
+
+
+ Failed to get the count value from the server.
+
+
+ Failed to get the value from the server.
+
+
+ Execute overload for void service operations and actions received a non-void response from the server.
+
+
+ The context is currently in no tracking mode, in order to use streams make sure your entities extend BaseEntityType and query the Item again from the server to populate the read link or enable tracking.
+
+
+ The context is in non tracking mode, The entity does not seem to have the media links populated properly. Please verify server response is correct and that the entity extends BaseEntityType.
+
+
+
diff --git a/src/Microsoft.OData.Client/SaveResult.cs b/src/Microsoft.OData.Client/SaveResult.cs
index 01d027d006..53ebcc28b0 100644
--- a/src/Microsoft.OData.Client/SaveResult.cs
+++ b/src/Microsoft.OData.Client/SaveResult.cs
@@ -344,7 +344,7 @@ protected override DataServiceResponse HandleResponse()
if (ex != null)
{
- throw new DataServiceRequestException(Strings.DataServiceException_GeneralError, ex, service);
+ throw new DataServiceRequestException(SRResources.DataServiceException_GeneralError, ex, service);
}
return service;
@@ -539,7 +539,7 @@ private ODataRequestMessageWrapper CheckAndProcessMediaEntryPost(EntityDescripto
{
// The entity is marked as MLE but we don't have the content property
// and the user didn't set the save stream.
- throw Error.InvalidOperation(Strings.Context_MLEWithoutSaveStream(type.ElementTypeName));
+ throw Error.InvalidOperation(Error.Format(SRResources.Context_MLEWithoutSaveStream, type.ElementTypeName));
}
Debug.Assert(
@@ -565,7 +565,7 @@ private ODataRequestMessageWrapper CheckAndProcessMediaEntryPost(EntityDescripto
if (String.IsNullOrEmpty(mimeType))
{
throw Error.InvalidOperation(
- Strings.Context_NoContentTypeForMediaLink(
+ Error.Format(SRResources.Context_NoContentTypeForMediaLink,
type.ElementTypeName,
type.MediaDataMember.MimeTypeProperty.PropertyName));
}
@@ -658,7 +658,7 @@ private ODataRequestMessageWrapper CheckAndProcessMediaEntryPut(EntityDescriptor
if (requestUri == null)
{
throw Error.InvalidOperation(
- Strings.Context_SetSaveStreamWithoutEditMediaLink);
+ SRResources.Context_SetSaveStreamWithoutEditMediaLink);
}
HeaderCollection headers = new HeaderCollection();
@@ -917,7 +917,7 @@ private ODataRequestMessageWrapper CreateNamedStreamRequest(StreamDescriptor nam
Uri requestUri = namedStreamInfo.GetLatestEditLink();
if (requestUri == null)
{
- throw Error.InvalidOperation(Strings.Context_SetSaveStreamWithoutNamedStreamEditLink(namedStreamInfo.Name));
+ throw Error.InvalidOperation(Error.Format(SRResources.Context_SetSaveStreamWithoutNamedStreamEditLink, namedStreamInfo.Name));
}
HeaderCollection headers = new HeaderCollection();
diff --git a/src/Microsoft.OData.Client/SendingRequestEventArgs.cs b/src/Microsoft.OData.Client/SendingRequestEventArgs.cs
index 9af651c182..6e375a4450 100644
--- a/src/Microsoft.OData.Client/SendingRequestEventArgs.cs
+++ b/src/Microsoft.OData.Client/SendingRequestEventArgs.cs
@@ -49,7 +49,7 @@ public System.Net.WebRequest Request
Util.CheckArgumentNull(value, "value");
if (!(value is System.Net.HttpWebRequest))
{
- throw Error.Argument(Strings.Context_SendingRequestEventArgsNotHttp, "value");
+ throw Error.Argument(SRResources.Context_SendingRequestEventArgsNotHttp, "value");
}
this.request = value;
diff --git a/src/Microsoft.OData.Client/Serialization/HttpClientRequestMessage.cs b/src/Microsoft.OData.Client/Serialization/HttpClientRequestMessage.cs
index 7f152cd14f..3228182c8c 100644
--- a/src/Microsoft.OData.Client/Serialization/HttpClientRequestMessage.cs
+++ b/src/Microsoft.OData.Client/Serialization/HttpClientRequestMessage.cs
@@ -312,7 +312,7 @@ public override Stream GetStream()
{
if (this.inSendingRequest2Event)
{
- throw new NotSupportedException(Strings.ODataRequestMessage_GetStreamMethodNotSupported);
+ throw new NotSupportedException(SRResources.ODataRequestMessage_GetStreamMethodNotSupported);
}
return _messageStream;
}
@@ -335,7 +335,7 @@ public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, objec
{
if (this.inSendingRequest2Event)
{
- throw new NotSupportedException(Strings.ODataRequestMessage_GetStreamMethodNotSupported);
+ throw new NotSupportedException(SRResources.ODataRequestMessage_GetStreamMethodNotSupported);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
taskCompletionSource.TrySetResult(_messageStream);
diff --git a/src/Microsoft.OData.Client/Serialization/ODataPropertyConverter.cs b/src/Microsoft.OData.Client/Serialization/ODataPropertyConverter.cs
index 21869d4fc6..f5b31d2ca2 100644
--- a/src/Microsoft.OData.Client/Serialization/ODataPropertyConverter.cs
+++ b/src/Microsoft.OData.Client/Serialization/ODataPropertyConverter.cs
@@ -155,12 +155,12 @@ internal ODataResourceWrapper CreateODataResourceWrapperForComplex(Type complexT
{
if (propertyName != null)
{
- throw Error.InvalidOperation(Strings.Serializer_LoopsNotAllowedInComplexTypes(propertyName));
+ throw Error.InvalidOperation(Error.Format(SRResources.Serializer_LoopsNotAllowedInComplexTypes, propertyName));
}
else
{
Debug.Assert(complexTypeAnnotation.ElementTypeName != null, "complexTypeAnnotation.ElementTypeName != null");
- throw Error.InvalidOperation(Strings.Serializer_LoopsNotAllowedInNonPropertyComplexTypes(complexTypeAnnotation.ElementTypeName));
+ throw Error.InvalidOperation(Error.Format(SRResources.Serializer_LoopsNotAllowedInNonPropertyComplexTypes, complexTypeAnnotation.ElementTypeName));
}
}
@@ -592,7 +592,7 @@ internal static object ConvertPrimitiveValueToRecognizedODataType(object propert
// don't support reverse mappings for these types in this version
// allows us to add real server support in the future without a
// "breaking change" in the future client
- throw new NotSupportedException(Strings.ALinq_CantCastToUnsupportedPrimitive(propertyType.Name));
+ throw new NotSupportedException(Error.Format(SRResources.ALinq_CantCastToUnsupportedPrimitive, propertyType.Name));
}
return propertyValue;
diff --git a/src/Microsoft.OData.Client/Serialization/ODataWriterWrapper.cs b/src/Microsoft.OData.Client/Serialization/ODataWriterWrapper.cs
index 3a48f0888b..5d8f1780b1 100644
--- a/src/Microsoft.OData.Client/Serialization/ODataWriterWrapper.cs
+++ b/src/Microsoft.OData.Client/Serialization/ODataWriterWrapper.cs
@@ -74,7 +74,7 @@ internal static ODataWriterWrapper CreateForDeltaFeed(ODataMessageWriter message
if (edmEntitySet == null)
{
- throw Error.InvalidOperation(Strings.DataBinding_Util_UnknownEntitySetName(entityDescriptor.Entity.GetType().FullName));
+ throw Error.InvalidOperation(Error.Format(SRResources.DataBinding_Util_UnknownEntitySetName, entityDescriptor.Entity.GetType().FullName));
}
return new ODataWriterWrapper(messageWriter.CreateODataDeltaResourceSetWriter(edmEntitySet, entityType), requestPipeline);
diff --git a/src/Microsoft.OData.Client/Serialization/Serializer.cs b/src/Microsoft.OData.Client/Serialization/Serializer.cs
index b0da9debb7..5d2118b396 100644
--- a/src/Microsoft.OData.Client/Serialization/Serializer.cs
+++ b/src/Microsoft.OData.Client/Serialization/Serializer.cs
@@ -295,7 +295,7 @@ internal void WriteBodyOperationParameters(List operatio
default:
// EdmTypeKind.Row
// EdmTypeKind.EntityReference
- throw new NotSupportedException(Strings.Serializer_InvalidParameterType(operationParameter.Name, edmType.TypeKind));
+ throw new NotSupportedException(Error.Format(SRResources.Serializer_InvalidParameterType, operationParameter.Name, edmType.TypeKind));
}
} // else
} // foreach
@@ -940,7 +940,7 @@ internal Uri WriteUriOperationParametersToUri(Uri requestUri, List
@@ -125,7 +125,7 @@ internal Uri GetEntitySetUri(string entitySetName)
/// The BaseUri property with a slash.
internal Uri GetBaseUriWithSlash()
{
- return this.GetBaseUriWithSlash(() => Strings.Context_BaseUriRequired);
+ return this.GetBaseUriWithSlash(() => SRResources.Context_BaseUriRequired);
}
///
@@ -138,7 +138,7 @@ internal Uri GetOrCreateAbsoluteUri(Uri requestUri)
Util.CheckArgumentNull(requestUri, "requestUri");
if (!requestUri.IsAbsoluteUri)
{
- return UriUtil.CreateUri(this.GetBaseUriWithSlash(() => Strings.Context_RequestUriIsRelativeBaseUriRequired), requestUri);
+ return UriUtil.CreateUri(this.GetBaseUriWithSlash(() => SRResources.Context_RequestUriIsRelativeBaseUriRequired), requestUri);
}
return requestUri;
@@ -157,10 +157,10 @@ private static void ConvertToAbsoluteAndValidateBaseUri(ref Uri baseUri, string
{
if (parameterName != null)
{
- throw Error.Argument(Strings.Context_BaseUri, parameterName);
+ throw Error.Argument(SRResources.Context_BaseUri, parameterName);
}
- throw Error.InvalidOperation(Strings.Context_BaseUri);
+ throw Error.InvalidOperation(SRResources.Context_BaseUri);
}
}
@@ -285,7 +285,7 @@ private Uri GetEntitySetUriFromResolver(string entitySetName)
return resolved;
}
- throw Error.InvalidOperation(Strings.Context_ResolveReturnedInvalidUri);
+ throw Error.InvalidOperation(SRResources.Context_ResolveReturnedInvalidUri);
}
}
diff --git a/src/Microsoft.OData.Client/Util.cs b/src/Microsoft.OData.Client/Util.cs
index 74c4c8117d..d837bcc261 100644
--- a/src/Microsoft.OData.Client/Util.cs
+++ b/src/Microsoft.OData.Client/Util.cs
@@ -156,7 +156,7 @@ internal static void CheckArgumentNotEmpty(string value, string parameterName)
{
if (value != null && value.Length == 0)
{
- throw Error.Argument(Strings.Util_EmptyString, parameterName);
+ throw Error.Argument(SRResources.Util_EmptyString, parameterName);
}
}
@@ -174,14 +174,14 @@ internal static void CheckArgumentNotEmpty(T[] value, string parameterName) w
CheckArgumentNull(value, parameterName);
if (value.Length == 0)
{
- throw Error.Argument(Strings.Util_EmptyArray, parameterName);
+ throw Error.Argument(SRResources.Util_EmptyArray, parameterName);
}
for (int i = 0; i < value.Length; ++i)
{
if (Object.ReferenceEquals(value[i], null))
{
- throw Error.Argument(Strings.Util_NullArrayElement, parameterName);
+ throw Error.Argument(SRResources.Util_NullArrayElement, parameterName);
}
}
}
diff --git a/src/Microsoft.OData.Client/WebUtil.cs b/src/Microsoft.OData.Client/WebUtil.cs
index e117eb1659..3c602a0dca 100644
--- a/src/Microsoft.OData.Client/WebUtil.cs
+++ b/src/Microsoft.OData.Client/WebUtil.cs
@@ -223,7 +223,7 @@ internal static void ValidateCollection(Type collectionItemType, object property
if (!PrimitiveType.IsKnownNullableType(collectionItemType) &&
collectionItemType.GetInterfaces().SingleOrDefault(t => t == typeof(IEnumerable)) != null)
{
- throw Error.InvalidOperation(Strings.ClientType_CollectionOfCollectionNotSupported);
+ throw Error.InvalidOperation(SRResources.ClientType_CollectionOfCollectionNotSupported);
}
if (propertyValue == null)
@@ -232,12 +232,12 @@ internal static void ValidateCollection(Type collectionItemType, object property
{
if (!isDynamicProperty)
{
- throw Error.InvalidOperation(Strings.Collection_NullCollectionNotSupported(propertyName));
+ throw Error.InvalidOperation(Error.Format(SRResources.Collection_NullCollectionNotSupported, propertyName));
}
}
else
{
- throw Error.InvalidOperation(Strings.Collection_NullNonPropertyCollectionNotSupported(collectionItemType));
+ throw Error.InvalidOperation(Error.Format(SRResources.Collection_NullNonPropertyCollectionNotSupported, collectionItemType));
}
}
}
@@ -258,18 +258,18 @@ internal static void ValidatePrimitiveCollectionItem(object itemValue, string pr
if (!PrimitiveType.IsKnownNullableType(itemValueType))
{
- throw Error.InvalidOperation(Strings.Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed);
+ throw Error.InvalidOperation(SRResources.Collection_CollectionTypesInCollectionOfPrimitiveTypesNotAllowed);
}
if (!collectionItemType.IsAssignableFrom(itemValueType))
{
if (propertyName != null)
{
- throw Error.InvalidOperation(Strings.WebUtil_TypeMismatchInCollection(propertyName));
+ throw Error.InvalidOperation(Error.Format(SRResources.WebUtil_TypeMismatchInCollection, propertyName));
}
else
{
- throw Error.InvalidOperation(Strings.WebUtil_TypeMismatchInNonPropertyCollection(collectionItemType));
+ throw Error.InvalidOperation(Error.Format(SRResources.WebUtil_TypeMismatchInNonPropertyCollection, collectionItemType));
}
}
}
@@ -290,18 +290,18 @@ internal static void ValidateComplexCollectionItem(object itemValue, string prop
if (PrimitiveType.IsKnownNullableType(itemValueType))
{
- throw Error.InvalidOperation(Strings.Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed);
+ throw Error.InvalidOperation(SRResources.Collection_PrimitiveTypesInCollectionOfComplexTypesNotAllowed);
}
if (!collectionItemType.IsAssignableFrom(itemValueType))
{
if (propertyName != null)
{
- throw Error.InvalidOperation(Strings.WebUtil_TypeMismatchInCollection(propertyName));
+ throw Error.InvalidOperation(Error.Format(SRResources.WebUtil_TypeMismatchInCollection, propertyName));
}
else
{
- throw Error.InvalidOperation(Strings.WebUtil_TypeMismatchInNonPropertyCollection(collectionItemType));
+ throw Error.InvalidOperation(Error.Format(SRResources.WebUtil_TypeMismatchInNonPropertyCollection, collectionItemType));
}
}
}
@@ -324,7 +324,7 @@ internal static Uri ValidateIdentityValue(string identityValue)
}
catch (FormatException)
{
- throw Error.InvalidOperation(Strings.Context_TrackingExpectsAbsoluteUri);
+ throw Error.InvalidOperation(SRResources.Context_TrackingExpectsAbsoluteUri);
}
return identity;
@@ -342,7 +342,7 @@ internal static Uri ValidateLocationHeader(string location)
Uri locationUri = UriUtil.CreateUri(location, UriKind.RelativeOrAbsolute);
if (!locationUri.IsAbsoluteUri)
{
- throw Error.InvalidOperation(Strings.Context_LocationHeaderExpectsAbsoluteUri);
+ throw Error.InvalidOperation(SRResources.Context_LocationHeaderExpectsAbsoluteUri);
}
return locationUri;
diff --git a/src/Microsoft.OData.Core/AnnotationFilterPattern.cs b/src/Microsoft.OData.Core/AnnotationFilterPattern.cs
index 4d9f55c513..e2f3429a64 100644
--- a/src/Microsoft.OData.Core/AnnotationFilterPattern.cs
+++ b/src/Microsoft.OData.Core/AnnotationFilterPattern.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
using System;
using System.Diagnostics;
@@ -243,7 +244,7 @@ private static void ValidatePattern(string pattern)
if (segmentCount == 1)
{
- throw new ArgumentException(Strings.AnnotationFilterPattern_InvalidPatternMissingDot(pattern));
+ throw new ArgumentException(Error.Format(SRResources.AnnotationFilterPattern_InvalidPatternMissingDot, pattern));
}
for (int idx = 0; idx < segmentCount; idx++)
@@ -251,18 +252,18 @@ private static void ValidatePattern(string pattern)
string currentSegment = segments[idx];
if (string.IsNullOrEmpty(currentSegment))
{
- throw new ArgumentException(Strings.AnnotationFilterPattern_InvalidPatternEmptySegment(pattern));
+ throw new ArgumentException(Error.Format(SRResources.AnnotationFilterPattern_InvalidPatternEmptySegment, pattern));
}
if (currentSegment != WildCard && currentSegment.Contains(WildCard, StringComparison.Ordinal))
{
- throw new ArgumentException(Strings.AnnotationFilterPattern_InvalidPatternWildCardInSegment(pattern));
+ throw new ArgumentException(Error.Format(SRResources.AnnotationFilterPattern_InvalidPatternWildCardInSegment, pattern));
}
bool isLastSegment = idx + 1 == segmentCount;
if (currentSegment == WildCard && !isLastSegment)
{
- throw new ArgumentException(Strings.AnnotationFilterPattern_InvalidPatternWildCardMustBeInLastSegment(pattern));
+ throw new ArgumentException(Error.Format(SRResources.AnnotationFilterPattern_InvalidPatternWildCardMustBeInLastSegment, pattern));
}
}
}
diff --git a/src/Microsoft.OData.Core/Batch/ODataBatchOperationHeaders.cs b/src/Microsoft.OData.Core/Batch/ODataBatchOperationHeaders.cs
index af3cd2d691..85c9f7df1a 100644
--- a/src/Microsoft.OData.Core/Batch/ODataBatchOperationHeaders.cs
+++ b/src/Microsoft.OData.Core/Batch/ODataBatchOperationHeaders.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections;
@@ -43,7 +44,7 @@ public string this[string key]
return value;
}
- throw new KeyNotFoundException(Strings.ODataBatchOperationHeaderDictionary_KeyNotFound(key));
+ throw new KeyNotFoundException(Error.Format(SRResources.ODataBatchOperationHeaderDictionary_KeyNotFound, key));
}
set
diff --git a/src/Microsoft.OData.Core/Batch/ODataBatchOperationMessage.cs b/src/Microsoft.OData.Core/Batch/ODataBatchOperationMessage.cs
index a294029703..39661b2863 100644
--- a/src/Microsoft.OData.Core/Batch/ODataBatchOperationMessage.cs
+++ b/src/Microsoft.OData.Core/Batch/ODataBatchOperationMessage.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -211,7 +212,7 @@ internal void VerifyNotCompleted()
{
if (this.contentStreamCreatorFunc == null)
{
- throw new ODataException(Strings.ODataBatchOperationMessage_VerifyNotCompleted);
+ throw new ODataException(SRResources.ODataBatchOperationMessage_VerifyNotCompleted);
}
}
}
diff --git a/src/Microsoft.OData.Core/Batch/ODataBatchReader.cs b/src/Microsoft.OData.Core/Batch/ODataBatchReader.cs
index 1e2e72180d..8beb400850 100644
--- a/src/Microsoft.OData.Core/Batch/ODataBatchReader.cs
+++ b/src/Microsoft.OData.Core/Batch/ODataBatchReader.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
@@ -454,7 +455,7 @@ private void IncreaseBatchSize()
{
if (this.currentBatchSize == this.inputContext.MessageReaderSettings.MessageQuotas.MaxPartsPerBatch)
{
- throw new ODataException(Strings.ODataBatchReader_MaxBatchSizeExceeded(this.inputContext.MessageReaderSettings.MessageQuotas.MaxPartsPerBatch));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_MaxBatchSizeExceeded, this.inputContext.MessageReaderSettings.MessageQuotas.MaxPartsPerBatch));
}
this.currentBatchSize++;
@@ -467,7 +468,7 @@ private void IncreaseChangesetSize()
{
if (this.currentChangeSetSize == this.inputContext.MessageReaderSettings.MessageQuotas.MaxOperationsPerChangeset)
{
- throw new ODataException(Strings.ODataBatchReader_MaxChangeSetSizeExceeded(this.inputContext.MessageReaderSettings.MessageQuotas.MaxOperationsPerChangeset));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_MaxChangeSetSizeExceeded, this.inputContext.MessageReaderSettings.MessageQuotas.MaxOperationsPerChangeset));
}
this.currentChangeSetSize++;
@@ -525,7 +526,7 @@ private bool ReadImplementation()
if (this.ReaderOperationState == OperationState.None)
{
// No message was created; fail
- throw new ODataException(Strings.ODataBatchReader_NoMessageWasCreatedForOperation);
+ throw new ODataException(SRResources.ODataBatchReader_NoMessageWasCreatedForOperation);
}
// Reset the operation state; the operation state only
@@ -540,7 +541,7 @@ private bool ReadImplementation()
if (this.PayloadUriConverter.ContainsContentId(this.contentIdToAddOnNextRead))
{
throw new ODataException(
- Strings.ODataBatchReader_DuplicateContentIDsNotAllowed(this.contentIdToAddOnNextRead));
+ Error.Format(SRResources.ODataBatchReader_DuplicateContentIDsNotAllowed, this.contentIdToAddOnNextRead));
}
this.PayloadUriConverter.AddContentId(this.contentIdToAddOnNextRead);
@@ -570,7 +571,7 @@ private bool ReadImplementation()
// changeset (or the end boundary of the changeset).
if (this.isInChangeset)
{
- ThrowODataException(Strings.ODataBatchReaderStream_NestedChangesetsAreNotSupported);
+ ThrowODataException(SRResources.ODataBatchReaderStream_NestedChangesetsAreNotSupported);
}
// Increment the batch size at the start of the changeset since we haven't counted it yet
@@ -597,11 +598,11 @@ private bool ReadImplementation()
case ODataBatchReaderState.Exception: // fall through
case ODataBatchReaderState.Completed:
Debug.Assert(false, "Should have checked in VerifyCanRead that we are not in one of these states.");
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReader_ReadImplementation));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReader_ReadImplementation));
default:
Debug.Assert(false, "Unsupported reader state " + this.State + " detected.");
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReader_ReadImplementation));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReader_ReadImplementation));
}
return this.State != ODataBatchReaderState.Completed && this.State != ODataBatchReaderState.Exception;
@@ -636,7 +637,7 @@ private async Task ReadImplementationAsync()
if (this.ReaderOperationState == OperationState.None)
{
// No message was created; fail
- throw new ODataException(Strings.ODataBatchReader_NoMessageWasCreatedForOperation);
+ throw new ODataException(SRResources.ODataBatchReader_NoMessageWasCreatedForOperation);
}
// Reset the operation state; the operation state only
@@ -651,7 +652,7 @@ private async Task ReadImplementationAsync()
if (this.PayloadUriConverter.ContainsContentId(this.contentIdToAddOnNextRead))
{
throw new ODataException(
- Strings.ODataBatchReader_DuplicateContentIDsNotAllowed(this.contentIdToAddOnNextRead));
+ Error.Format(SRResources.ODataBatchReader_DuplicateContentIDsNotAllowed, this.contentIdToAddOnNextRead));
}
this.PayloadUriConverter.AddContentId(this.contentIdToAddOnNextRead);
@@ -682,7 +683,7 @@ private async Task ReadImplementationAsync()
// changeset (or the end boundary of the changeset).
if (this.isInChangeset)
{
- ThrowODataException(Strings.ODataBatchReaderStream_NestedChangesetsAreNotSupported);
+ ThrowODataException(SRResources.ODataBatchReaderStream_NestedChangesetsAreNotSupported);
}
// Increment the batch size at the start of the changeset since we haven't counted it yet
@@ -711,11 +712,11 @@ private async Task ReadImplementationAsync()
case ODataBatchReaderState.Exception: // fall through
case ODataBatchReaderState.Completed:
Debug.Assert(false, "Should have checked in VerifyCanRead that we are not in one of these states.");
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReader_ReadImplementation));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReader_ReadImplementation));
default:
Debug.Assert(false, "Unsupported reader state " + this.State + " detected.");
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReader_ReadImplementation));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReader_ReadImplementation));
}
return this.State != ODataBatchReaderState.Completed && this.State != ODataBatchReaderState.Exception;
@@ -732,17 +733,17 @@ private void VerifyCanCreateOperationRequestMessage(bool synchronousCall)
if (this.inputContext.ReadingResponse)
{
- this.ThrowODataException(Strings.ODataBatchReader_CannotCreateRequestOperationWhenReadingResponse);
+ this.ThrowODataException(SRResources.ODataBatchReader_CannotCreateRequestOperationWhenReadingResponse);
}
if (this.State != ODataBatchReaderState.Operation)
{
- this.ThrowODataException(Strings.ODataBatchReader_InvalidStateForCreateOperationRequestMessage(this.State));
+ this.ThrowODataException(Error.Format(SRResources.ODataBatchReader_InvalidStateForCreateOperationRequestMessage, this.State));
}
if (this.operationState != OperationState.None)
{
- this.ThrowODataException(Strings.ODataBatchReader_OperationRequestMessageAlreadyCreated);
+ this.ThrowODataException(SRResources.ODataBatchReader_OperationRequestMessageAlreadyCreated);
}
}
@@ -757,17 +758,17 @@ private void VerifyCanCreateOperationResponseMessage(bool synchronousCall)
if (!this.inputContext.ReadingResponse)
{
- this.ThrowODataException(Strings.ODataBatchReader_CannotCreateResponseOperationWhenReadingRequest);
+ this.ThrowODataException(SRResources.ODataBatchReader_CannotCreateResponseOperationWhenReadingRequest);
}
if (this.State != ODataBatchReaderState.Operation)
{
- this.ThrowODataException(Strings.ODataBatchReader_InvalidStateForCreateOperationResponseMessage(this.State));
+ this.ThrowODataException(Error.Format(SRResources.ODataBatchReader_InvalidStateForCreateOperationResponseMessage, this.State));
}
if (this.operationState != OperationState.None)
{
- this.ThrowODataException(Strings.ODataBatchReader_OperationResponseMessageAlreadyCreated);
+ this.ThrowODataException(SRResources.ODataBatchReader_OperationResponseMessageAlreadyCreated);
}
}
@@ -782,7 +783,7 @@ private void VerifyCanRead(bool synchronousCall)
if (this.State == ODataBatchReaderState.Exception || this.State == ODataBatchReaderState.Completed)
{
- throw new ODataException(Strings.ODataBatchReader_ReadOrReadAsyncCalledInInvalidState(this.State));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_ReadOrReadAsyncCalledInInvalidState, this.State));
}
}
@@ -796,7 +797,7 @@ private void VerifyReaderReady()
// If the operation stream was requested but not yet disposed, the batch reader can't be used to do anything.
if (this.operationState == OperationState.StreamRequested)
{
- throw new ODataException(Strings.ODataBatchReader_CannotUseReaderWhileOperationStreamActive);
+ throw new ODataException(SRResources.ODataBatchReader_CannotUseReaderWhileOperationStreamActive);
}
}
@@ -810,14 +811,14 @@ private void VerifyCallAllowed(bool synchronousCall)
{
if (!this.synchronous)
{
- throw new ODataException(Strings.ODataBatchReader_SyncCallOnAsyncReader);
+ throw new ODataException(SRResources.ODataBatchReader_SyncCallOnAsyncReader);
}
}
else
{
if (this.synchronous)
{
- throw new ODataException(Strings.ODataBatchReader_AsyncCallOnSyncReader);
+ throw new ODataException(SRResources.ODataBatchReader_AsyncCallOnSyncReader);
}
}
}
diff --git a/src/Microsoft.OData.Core/Batch/ODataBatchReaderStreamBuffer.cs b/src/Microsoft.OData.Core/Batch/ODataBatchReaderStreamBuffer.cs
index 2eac4fb37d..ea280587d8 100644
--- a/src/Microsoft.OData.Core/Batch/ODataBatchReaderStreamBuffer.cs
+++ b/src/Microsoft.OData.Core/Batch/ODataBatchReaderStreamBuffer.cs
@@ -8,6 +8,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -235,7 +236,7 @@ internal ODataBatchReaderStreamScanResult ScanForBoundary(
break;
default:
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStreamBuffer_ScanForBoundary));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStreamBuffer_ScanForBoundary));
}
}
@@ -247,7 +248,7 @@ internal ODataBatchReaderStreamScanResult ScanForBoundary(
break;
default:
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStreamBuffer_ScanForBoundary));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStreamBuffer_ScanForBoundary));
}
}
}
@@ -479,7 +480,7 @@ private ODataBatchReaderStreamScanResult MatchBoundary(
// and we still could not find the end of it because there are
// so many whitespaces before the terminating line resource set - fail
// (security limit on the whitespaces)
- throw new ODataException(Strings.ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached(BufferLength));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached, BufferLength));
}
// Report a partial match.
@@ -501,7 +502,7 @@ private ODataBatchReaderStreamScanResult MatchBoundary(
// and we still could not find the end of it because there are
// so many whitespaces before the terminating line resource set - fail
// (security limit on the whitespaces)
- throw new ODataException(Strings.ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached(BufferLength));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached, BufferLength));
}
// Report a partial match.
@@ -515,7 +516,7 @@ private ODataBatchReaderStreamScanResult MatchBoundary(
return ODataBatchReaderStreamScanResult.Match;
default:
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStreamBuffer_ScanForBoundary));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStreamBuffer_ScanForBoundary));
}
}
}
diff --git a/src/Microsoft.OData.Core/Batch/ODataBatchUtils.cs b/src/Microsoft.OData.Core/Batch/ODataBatchUtils.cs
index ebfa4e7256..1e797249d5 100644
--- a/src/Microsoft.OData.Core/Batch/ODataBatchUtils.cs
+++ b/src/Microsoft.OData.Core/Batch/ODataBatchUtils.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -59,8 +60,8 @@ internal static Uri CreateOperationRequestUri(Uri uri, Uri baseUri, IODataPayloa
if (baseUri == null)
{
string errorMessage = UriUtils.UriToString(uri).StartsWith("$", StringComparison.Ordinal)
- ? Strings.ODataBatchUtils_RelativeUriStartingWithDollarUsedWithoutBaseUriSpecified(UriUtils.UriToString(uri))
- : Strings.ODataBatchUtils_RelativeUriUsedWithoutBaseUriSpecified(UriUtils.UriToString(uri));
+ ? Error.Format(SRResources.ODataBatchUtils_RelativeUriStartingWithDollarUsedWithoutBaseUriSpecified, UriUtils.UriToString(uri))
+ : Error.Format(SRResources.ODataBatchUtils_RelativeUriUsedWithoutBaseUriSpecified, UriUtils.UriToString(uri));
throw new ODataException(errorMessage);
}
@@ -94,7 +95,7 @@ internal static ODataReadStream CreateBatchOperationReadStream(
int length = Int32.Parse(contentLengthValue, CultureInfo.InvariantCulture);
if (length < 0)
{
- throw new ODataException(Strings.ODataBatchReaderStream_InvalidContentLengthSpecified(contentLengthValue));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStream_InvalidContentLengthSpecified, contentLengthValue));
}
return ODataReadStream.Create(batchReaderStream, operationListener, length, synchronous);
@@ -213,7 +214,7 @@ internal static void ValidateReferenceUri(Uri uri, IEnumerable dependsOn
// ids, therefore it should contain the request id referenced by the Uri.
if (dependsOnRequestIds == null || !dependsOnRequestIds.Contains(referenceId))
{
- throw new ODataException(Strings.ODataBatchReader_ReferenceIdNotIncludedInDependsOn(
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_ReferenceIdNotIncludedInDependsOn,
referenceId, UriUtils.UriToString(uri),
dependsOnRequestIds != null ? string.Join(",", dependsOnRequestIds.ToArray()) : "null"));
}
diff --git a/src/Microsoft.OData.Core/Batch/ODataBatchWriter.cs b/src/Microsoft.OData.Core/Batch/ODataBatchWriter.cs
index 8cd6aa0b5a..ac6e205ea4 100644
--- a/src/Microsoft.OData.Core/Batch/ODataBatchWriter.cs
+++ b/src/Microsoft.OData.Core/Batch/ODataBatchWriter.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -960,7 +961,7 @@ private void RememberContentIdHeader(string contentId)
// want to fail on the duplicate.
if (contentId != null && this.payloadUriConverter.ContainsContentId(contentId))
{
- throw new ODataException(Strings.ODataBatchWriter_DuplicateContentIDsNotAllowed(contentId));
+ throw new ODataException(Error.Format(SRResources.ODataBatchWriter_DuplicateContentIDsNotAllowed, contentId));
}
// Set the current content ID. If no Content-ID header is found in the message,
@@ -977,7 +978,7 @@ private void IncreaseBatchSize()
if (this.currentBatchSize > this.outputContext.MessageWriterSettings.MessageQuotas.MaxPartsPerBatch)
{
- throw new ODataException(Strings.ODataBatchWriter_MaxBatchSizeExceeded(this.outputContext.MessageWriterSettings.MessageQuotas.MaxPartsPerBatch));
+ throw new ODataException(Error.Format(SRResources.ODataBatchWriter_MaxBatchSizeExceeded, this.outputContext.MessageWriterSettings.MessageQuotas.MaxPartsPerBatch));
}
}
@@ -990,7 +991,7 @@ private void IncreaseChangeSetSize()
if (this.currentChangeSetSize > this.outputContext.MessageWriterSettings.MessageQuotas.MaxOperationsPerChangeset)
{
- throw new ODataException(Strings.ODataBatchWriter_MaxChangeSetSizeExceeded(this.outputContext.MessageWriterSettings.MessageQuotas.MaxOperationsPerChangeset));
+ throw new ODataException(Error.Format(SRResources.ODataBatchWriter_MaxChangeSetSizeExceeded, this.outputContext.MessageWriterSettings.MessageQuotas.MaxOperationsPerChangeset));
}
}
@@ -1012,14 +1013,14 @@ private void VerifyCallAllowed(bool synchronousCall)
{
if (!this.outputContext.Synchronous)
{
- throw new ODataException(Strings.ODataBatchWriter_SyncCallOnAsyncWriter);
+ throw new ODataException(SRResources.ODataBatchWriter_SyncCallOnAsyncWriter);
}
}
else
{
if (this.outputContext.Synchronous)
{
- throw new ODataException(Strings.ODataBatchWriter_AsyncCallOnSyncWriter);
+ throw new ODataException(SRResources.ODataBatchWriter_AsyncCallOnSyncWriter);
}
}
}
@@ -1043,12 +1044,12 @@ private void VerifyCanCreateOperationRequestMessage(bool synchronousCall, string
{
if (HttpUtils.IsQueryMethod(method))
{
- this.ThrowODataException(Strings.ODataBatch_InvalidHttpMethodForChangeSetRequest(method));
+ this.ThrowODataException(Error.Format(SRResources.ODataBatch_InvalidHttpMethodForChangeSetRequest, method));
}
if (string.IsNullOrEmpty(contentId))
{
- this.ThrowODataException(Strings.ODataBatchOperationHeaderDictionary_KeyNotFound(ODataConstants.ContentIdHeader));
+ this.ThrowODataException(Error.Format(SRResources.ODataBatchOperationHeaderDictionary_KeyNotFound, ODataConstants.ContentIdHeader));
}
}
@@ -1058,7 +1059,7 @@ private void VerifyCanCreateOperationRequestMessage(bool synchronousCall, string
if (this.outputContext.WritingResponse)
{
- this.ThrowODataException(Strings.ODataBatchWriter_CannotCreateRequestOperationWhenWritingResponse);
+ this.ThrowODataException(SRResources.ODataBatchWriter_CannotCreateRequestOperationWhenWritingResponse);
}
}
@@ -1072,7 +1073,7 @@ private void VerifyCanFlush(bool synchronousCall)
this.VerifyCallAllowed(synchronousCall);
if (this.state == BatchWriterState.OperationStreamRequested)
{
- this.ThrowODataException(Strings.ODataBatchWriter_FlushOrFlushAsyncCalledInStreamRequestedState);
+ this.ThrowODataException(SRResources.ODataBatchWriter_FlushOrFlushAsyncCalledInStreamRequestedState);
}
}
@@ -1086,7 +1087,7 @@ private void ValidateWriterReady()
// If the operation stream was requested but not yet disposed, the writer can't be used to do anything.
if (this.state == BatchWriterState.OperationStreamRequested)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested);
}
}
@@ -1152,7 +1153,7 @@ private void VerifyCanCreateOperationResponseMessage(bool synchronousCall)
if (!this.outputContext.WritingResponse)
{
- this.ThrowODataException(Strings.ODataBatchWriter_CannotCreateResponseOperationWhenWritingRequest);
+ this.ThrowODataException(SRResources.ODataBatchWriter_CannotCreateResponseOperationWhenWritingRequest);
}
}
@@ -1175,7 +1176,7 @@ private void ValidateTransition(BatchWriterState newState)
// make sure that we are not starting a changeset when one is already active
if (this.isInChangeset)
{
- throw new ODataException(Strings.ODataBatchWriter_CannotStartChangeSetWithActiveChangeSet);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotStartChangeSetWithActiveChangeSet);
}
break;
@@ -1183,7 +1184,7 @@ private void ValidateTransition(BatchWriterState newState)
// make sure that we are not completing a changeset without an active changeset
if (!this.isInChangeset)
{
- throw new ODataException(Strings.ODataBatchWriter_CannotCompleteChangeSetWithoutActiveChangeSet);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotCompleteChangeSetWithoutActiveChangeSet);
}
break;
@@ -1191,7 +1192,7 @@ private void ValidateTransition(BatchWriterState newState)
// make sure that we are not completing a batch while a changeset is still active
if (this.isInChangeset)
{
- throw new ODataException(Strings.ODataBatchWriter_CannotCompleteBatchWithActiveChangeSet);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotCompleteBatchWithActiveChangeSet);
}
break;
@@ -1202,21 +1203,21 @@ private void ValidateTransition(BatchWriterState newState)
case BatchWriterState.Start:
if (newState != BatchWriterState.BatchStarted)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromStart);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromStart);
}
break;
case BatchWriterState.BatchStarted:
if (newState != BatchWriterState.ChangesetStarted && newState != BatchWriterState.OperationCreated && newState != BatchWriterState.BatchCompleted)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromBatchStarted);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromBatchStarted);
}
break;
case BatchWriterState.ChangesetStarted:
if (newState != BatchWriterState.OperationCreated && newState != BatchWriterState.ChangesetCompleted)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromChangeSetStarted);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromChangeSetStarted);
}
break;
@@ -1227,7 +1228,7 @@ private void ValidateTransition(BatchWriterState newState)
newState != BatchWriterState.ChangesetCompleted &&
newState != BatchWriterState.BatchCompleted)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromOperationCreated);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromOperationCreated);
}
Debug.Assert(newState != BatchWriterState.OperationStreamDisposed, "newState != BatchWriterState.OperationStreamDisposed");
@@ -1236,7 +1237,7 @@ private void ValidateTransition(BatchWriterState newState)
case BatchWriterState.OperationStreamRequested:
if (newState != BatchWriterState.OperationStreamDisposed)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested);
}
break;
@@ -1246,7 +1247,7 @@ private void ValidateTransition(BatchWriterState newState)
newState != BatchWriterState.ChangesetCompleted &&
newState != BatchWriterState.BatchCompleted)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromOperationContentStreamDisposed);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromOperationContentStreamDisposed);
}
break;
@@ -1255,24 +1256,24 @@ private void ValidateTransition(BatchWriterState newState)
newState != BatchWriterState.ChangesetStarted &&
newState != BatchWriterState.OperationCreated)
{
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromChangeSetCompleted);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromChangeSetCompleted);
}
break;
case BatchWriterState.BatchCompleted:
// no more state transitions should happen once in completed state
- throw new ODataException(Strings.ODataBatchWriter_InvalidTransitionFromBatchCompleted);
+ throw new ODataException(SRResources.ODataBatchWriter_InvalidTransitionFromBatchCompleted);
case BatchWriterState.Error:
if (newState != BatchWriterState.Error)
{
// No more state transitions once we are in error state except for the fatal error
- throw new ODataException(Strings.ODataWriterCore_InvalidTransitionFromError(this.state.ToString(), newState.ToString()));
+ throw new ODataException(Error.Format(SRResources.ODataWriterCore_InvalidTransitionFromError, this.state.ToString(), newState.ToString()));
}
break;
default:
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchWriter_ValidateTransition_UnreachableCodePath));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchWriter_ValidateTransition_UnreachableCodePath));
}
}
}
diff --git a/src/Microsoft.OData.Core/Buffers/BufferUtils.cs b/src/Microsoft.OData.Core/Buffers/BufferUtils.cs
index 10387bd717..e15bb5412e 100644
--- a/src/Microsoft.OData.Core/Buffers/BufferUtils.cs
+++ b/src/Microsoft.OData.Core/Buffers/BufferUtils.cs
@@ -4,6 +4,8 @@
//
//---------------------------------------------------------------------
+using Microsoft.OData.Core;
+
namespace Microsoft.OData.Buffers
{
///
@@ -58,7 +60,7 @@ public static char[] RentFromBuffer(ICharArrayPool bufferPool, int minSize)
char[] buffer = bufferPool.Rent(minSize);
if (buffer == null || buffer.Length < minSize)
{
- throw new ODataException(Strings.BufferUtils_InvalidBufferOrSize(minSize));
+ throw new ODataException(Error.Format(SRResources.BufferUtils_InvalidBufferOrSize, minSize));
}
return buffer;
diff --git a/src/Microsoft.OData.Core/CollectionWithoutExpectedTypeValidator.cs b/src/Microsoft.OData.Core/CollectionWithoutExpectedTypeValidator.cs
index eb29b2d227..403000f222 100644
--- a/src/Microsoft.OData.Core/CollectionWithoutExpectedTypeValidator.cs
+++ b/src/Microsoft.OData.Core/CollectionWithoutExpectedTypeValidator.cs
@@ -8,6 +8,7 @@ namespace Microsoft.OData
{
#region Namespaces
using System.Diagnostics;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
#endregion Namespaces
@@ -80,7 +81,7 @@ internal void ValidateCollectionItem(string collectionItemTypeName, EdmTypeKind
// Only primitive and complex values are allowed in collections
if (collectionItemTypeKind != EdmTypeKind.Primitive && collectionItemTypeKind != EdmTypeKind.Enum && collectionItemTypeKind != EdmTypeKind.Complex)
{
- throw new ODataException(Strings.CollectionWithoutExpectedTypeValidator_InvalidItemTypeKind(collectionItemTypeKind));
+ throw new ODataException(Error.Format(SRResources.CollectionWithoutExpectedTypeValidator_InvalidItemTypeKind, collectionItemTypeKind));
}
if (this.itemTypeDerivedFromCollectionValue)
@@ -185,7 +186,7 @@ private void ValidateCollectionItemTypeNameAndKind(string collectionItemTypeName
// Compare the item type kinds.
if (this.itemTypeKind != collectionItemTypeKind)
{
- throw new ODataException(Strings.CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeKind(collectionItemTypeKind, this.itemTypeKind));
+ throw new ODataException(Error.Format(SRResources.CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeKind, collectionItemTypeKind, this.itemTypeKind));
}
if (this.itemTypeKind == EdmTypeKind.Primitive)
@@ -225,14 +226,14 @@ private void ValidateCollectionItemTypeNameAndKind(string collectionItemTypeName
}
}
- throw new ODataException(Strings.CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName(collectionItemTypeName, this.itemTypeName));
+ throw new ODataException(Error.Format(SRResources.CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName, collectionItemTypeName, this.itemTypeName));
}
else
{
// Since we do not support type inheritance for complex types, comparison of the type names is sufficient
if (string.CompareOrdinal(this.itemTypeName, collectionItemTypeName) != 0)
{
- throw new ODataException(Strings.CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName(collectionItemTypeName, this.itemTypeName));
+ throw new ODataException(Error.Format(SRResources.CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName, collectionItemTypeName, this.itemTypeName));
}
}
}
diff --git a/src/Microsoft.OData.Core/DerivedTypeValidator.cs b/src/Microsoft.OData.Core/DerivedTypeValidator.cs
index cb3fd6b483..385b99712c 100644
--- a/src/Microsoft.OData.Core/DerivedTypeValidator.cs
+++ b/src/Microsoft.OData.Core/DerivedTypeValidator.cs
@@ -8,6 +8,7 @@ namespace Microsoft.OData
{
using System.Collections.Generic;
using System.Linq;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
///
@@ -70,7 +71,7 @@ internal void ValidateResourceType(string resourceTypeName)
return;
}
- throw new ODataException(Strings.ReaderValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint(resourceTypeName, resourceKind, resourceName));
+ throw new ODataException(Error.Format(SRResources.ReaderValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint, resourceTypeName, resourceKind, resourceName));
}
}
}
diff --git a/src/Microsoft.OData.Core/DuplicatePropertyNameChecker.cs b/src/Microsoft.OData.Core/DuplicatePropertyNameChecker.cs
index d4bfb7bd2f..f4b05dcd94 100644
--- a/src/Microsoft.OData.Core/DuplicatePropertyNameChecker.cs
+++ b/src/Microsoft.OData.Core/DuplicatePropertyNameChecker.cs
@@ -4,6 +4,7 @@
//
//---------------------------------------------------------------------
+using Microsoft.OData.Core;
using System;
using System.Collections.Generic;
@@ -57,8 +58,7 @@ public void ValidatePropertyUniqueness(ODataPropertyInfo property)
catch (ArgumentException)
{
throw new ODataException(
- Strings.DuplicatePropertyNamesNotAllowed(
- property.Name));
+ Error.Format(SRResources.DuplicatePropertyNamesNotAllowed, property.Name));
}
}
@@ -78,8 +78,7 @@ public void ValidatePropertyUniqueness(ODataNestedResourceInfo property)
if (state != State.AssociationLink)
{
throw new ODataException(
- Strings.DuplicatePropertyNamesNotAllowed(
- property.Name));
+ Error.Format(SRResources.DuplicatePropertyNamesNotAllowed, property.Name));
}
else
{
@@ -105,8 +104,7 @@ public void ValidatePropertyOpenForAssociationLink(string propertyName)
if (state != State.NestedResource)
{
throw new ODataException(
- Strings.DuplicatePropertyNamesNotAllowed(
- propertyName));
+ Error.Format(SRResources.DuplicatePropertyNamesNotAllowed, propertyName));
}
else
{
diff --git a/src/Microsoft.OData.Core/ErrorUtils.cs b/src/Microsoft.OData.Core/ErrorUtils.cs
index b330c13d4d..b939adf7c0 100644
--- a/src/Microsoft.OData.Core/ErrorUtils.cs
+++ b/src/Microsoft.OData.Core/ErrorUtils.cs
@@ -6,6 +6,7 @@
using System.Diagnostics;
using System.Xml;
+using Microsoft.OData.Core;
using Microsoft.OData.Json;
using Microsoft.OData.Metadata;
@@ -119,7 +120,7 @@ private static void WriteXmlInnerError(
if (recursionDepth > maxInnerErrorDepth)
{
#if ODATA_CORE
- throw new ODataException(Strings.ValidationUtils_RecursionDepthLimitReached(maxInnerErrorDepth));
+ throw new ODataException(Error.Format(SRResources.ValidationUtils_RecursionDepthLimitReached, maxInnerErrorDepth));
#else
throw new ODataException(Microsoft.OData.Service.Strings.BadRequest_DeepRecursion(maxInnerErrorDepth));
#endif
diff --git a/src/Microsoft.OData.Core/Evaluation/EdmValueUtils.cs b/src/Microsoft.OData.Core/Evaluation/EdmValueUtils.cs
index c09092ae97..972f481901 100644
--- a/src/Microsoft.OData.Core/Evaluation/EdmValueUtils.cs
+++ b/src/Microsoft.OData.Core/Evaluation/EdmValueUtils.cs
@@ -9,13 +9,9 @@
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.Spatial;
+using Microsoft.OData.Core;
#if ODATA_CLIENT
using Microsoft.OData;
- using ErrorStrings = Microsoft.OData.Client.Strings;
- using PlatformHelpers = Microsoft.OData.Client.PlatformHelper;
-#else
-using ErrorStrings = Microsoft.OData.Strings;
-using PlatformHelpers = Microsoft.OData.PlatformHelper;
#endif
#if ODATA_CLIENT
@@ -153,7 +149,7 @@ internal static object ToClrValue(this IEdmPrimitiveValue edmValue)
return ((IEdmEnumValue)edmValue).Value.Value;
}
- throw new ODataException(ErrorStrings.EdmValueUtils_CannotConvertTypeToClrValue(edmValue.ValueKind));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_CannotConvertTypeToClrValue, edmValue.ValueKind));
}
#if !ODATA_CLIENT
@@ -196,7 +192,7 @@ internal static object GetPrimitivePropertyClrValue(this IEdmStructuredValue str
IEdmPropertyValue propertyValue = structuredValue.FindPropertyValue(propertyName);
if (propertyValue == null)
{
- throw new ODataException(ErrorStrings.EdmValueUtils_PropertyDoesntExist(valueType.FullName(), propertyName));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_PropertyDoesntExist, valueType.FullName(), propertyName));
}
if (propertyValue.Value.ValueKind == EdmValueKind.Null)
@@ -207,7 +203,7 @@ internal static object GetPrimitivePropertyClrValue(this IEdmStructuredValue str
IEdmPrimitiveValue primitiveValue = propertyValue.Value as IEdmPrimitiveValue;
if (primitiveValue == null)
{
- throw new ODataException(ErrorStrings.EdmValueUtils_NonPrimitiveValue(propertyValue.Name, valueType.FullName()));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_NonPrimitiveValue, propertyValue.Name, valueType.FullName()));
}
return primitiveValue.ToClrValue();
@@ -336,7 +332,7 @@ private static IEdmDelayedValue ConvertPrimitiveValueWithoutTypeCode(object prim
}
#endif
- throw new ODataException(ErrorStrings.EdmValueUtils_UnsupportedPrimitiveType(primitiveValue.GetType().FullName));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_UnsupportedPrimitiveType, primitiveValue.GetType().FullName));
}
#if ODATA_CLIENT
@@ -397,10 +393,10 @@ private static IEdmPrimitiveTypeReference EnsurePrimitiveType(IEdmPrimitiveTypeR
string typeName = type.FullName();
if (typeName == null)
{
- throw new ODataException(ErrorStrings.EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName(primitiveKindFromType.ToString(), primitiveKindFromValue.ToString()));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName, primitiveKindFromType.ToString(), primitiveKindFromValue.ToString()));
}
- throw new ODataException(ErrorStrings.EdmValueUtils_IncorrectPrimitiveTypeKind(typeName, primitiveKindFromValue.ToString(), primitiveKindFromType.ToString()));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_IncorrectPrimitiveTypeKind, typeName, primitiveKindFromValue.ToString(), primitiveKindFromType.ToString()));
}
}
diff --git a/src/Microsoft.OData.Core/Evaluation/LiteralFormatter.cs b/src/Microsoft.OData.Core/Evaluation/LiteralFormatter.cs
index 1760944cc8..3028730544 100644
--- a/src/Microsoft.OData.Core/Evaluation/LiteralFormatter.cs
+++ b/src/Microsoft.OData.Core/Evaluation/LiteralFormatter.cs
@@ -307,10 +307,10 @@ internal static InvalidOperationException CreateExceptionForUnconvertableType(ob
return new InvalidOperationException(Microsoft.OData.Service.Strings.Serializer_CannotConvertValue(value));
#endif
#if ODATA_CLIENT
- return Error.InvalidOperation(Client.Strings.Context_CannotConvertKey(value));
+ return Error.InvalidOperation(Error.Format(SRResources.Context_CannotConvertKey, value));
#endif
#if ODATA_CORE
- return new ODataException(Strings.ODataUriUtils_ConvertToUriLiteralUnsupportedType(value.GetType().ToString()));
+ return new ODataException(Core.Error.Format(Core.SRResources.ODataUriUtils_ConvertToUriLiteralUnsupportedType, value.GetType().ToString()));
#endif
}
diff --git a/src/Microsoft.OData.Core/Evaluation/ODataConventionalIdMetadataBuilder.cs b/src/Microsoft.OData.Core/Evaluation/ODataConventionalIdMetadataBuilder.cs
index f4926dc193..633f75f72c 100644
--- a/src/Microsoft.OData.Core/Evaluation/ODataConventionalIdMetadataBuilder.cs
+++ b/src/Microsoft.OData.Core/Evaluation/ODataConventionalIdMetadataBuilder.cs
@@ -14,6 +14,7 @@ namespace Microsoft.OData.Evaluation
using Microsoft.OData.Metadata;
using Microsoft.OData.UriParser;
using Microsoft.OData.Edm;
+ using Microsoft.OData.Core;
#endregion
///
@@ -181,7 +182,7 @@ private Uri ComputeIdForContainment()
if (odataPath == null || odataPath.Count == 0)
{
- throw new ODataException(Strings.ODataMetadataBuilder_MissingParentIdOrContextUrl);
+ throw new ODataException(SRResources.ODataMetadataBuilder_MissingParentIdOrContextUrl);
}
uri = this.GetContainingEntitySetUri(uri, odataPath);
diff --git a/src/Microsoft.OData.Core/Evaluation/ODataConventionalUriBuilder.cs b/src/Microsoft.OData.Core/Evaluation/ODataConventionalUriBuilder.cs
index 4a8138ce04..0ca3dfddc0 100644
--- a/src/Microsoft.OData.Core/Evaluation/ODataConventionalUriBuilder.cs
+++ b/src/Microsoft.OData.Core/Evaluation/ODataConventionalUriBuilder.cs
@@ -9,6 +9,7 @@
using System.Diagnostics;
using System.Linq;
using System.Text;
+using Microsoft.OData.Core;
using Microsoft.OData.Json;
namespace Microsoft.OData.Evaluation
@@ -257,7 +258,7 @@ private static object ValidateKeyValue(string keyPropertyName, object keyPropert
{
if (keyPropertyValue == null)
{
- throw new ODataException(Strings.ODataConventionalUriBuilder_NullKeyValue(keyPropertyName, entityTypeName));
+ throw new ODataException(Error.Format(SRResources.ODataConventionalUriBuilder_NullKeyValue, keyPropertyName, entityTypeName));
}
return keyPropertyValue;
@@ -276,7 +277,7 @@ private void AppendKeyExpression(StringBuilder builder, ICollection p.Key, p => ValidateKeyValue(p.Key, p.Value, entityTypeName));
diff --git a/src/Microsoft.OData.Core/Evaluation/ODataMetadataContext.cs b/src/Microsoft.OData.Core/Evaluation/ODataMetadataContext.cs
index 796fe03b69..e283e643a6 100644
--- a/src/Microsoft.OData.Core/Evaluation/ODataMetadataContext.cs
+++ b/src/Microsoft.OData.Core/Evaluation/ODataMetadataContext.cs
@@ -9,6 +9,7 @@ namespace Microsoft.OData.Evaluation
using System;
using System.Collections.Generic;
using System.Diagnostics;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Json;
using Microsoft.OData.Metadata;
@@ -204,7 +205,7 @@ public Uri MetadataDocumentUri
{
if (this.metadataDocumentUri == null)
{
- throw new ODataException(Strings.ODataJsonResourceMetadataContext_MetadataAnnotationMustBeInPayload(ODataAnnotationNames.ODataContext));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceMetadataContext_MetadataAnnotationMustBeInPayload, ODataAnnotationNames.ODataContext));
}
Debug.Assert(this.metadataDocumentUri.IsAbsoluteUri, "this.metadataDocumentUri.IsAbsoluteUri");
diff --git a/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataBuilder.cs b/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataBuilder.cs
index d30727a2b6..303036ebc3 100644
--- a/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataBuilder.cs
+++ b/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataBuilder.cs
@@ -16,6 +16,7 @@ namespace Microsoft.OData.Evaluation
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Microsoft.OData.Json;
+ using Microsoft.OData.Core;
#endregion
///
@@ -144,13 +145,13 @@ internal virtual IEnumerable GetProperties(IEnumerable t is ODataResourceValue))
{
- throw new ODataException(Strings.ODataResource_PropertyValueCannotBeODataResourceValue(property.Name));
+ throw new ODataException(Error.Format(SRResources.ODataResource_PropertyValueCannotBeODataResourceValue, property.Name));
}
return true;
diff --git a/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataContext.cs b/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataContext.cs
index 6c910152c8..823d652bab 100644
--- a/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataContext.cs
+++ b/src/Microsoft.OData.Core/Evaluation/ODataResourceMetadataContext.cs
@@ -11,6 +11,7 @@ namespace Microsoft.OData.Evaluation
using System.Diagnostics;
using System.Linq;
using Microsoft.OData;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OData.Edm.Vocabularies.V1;
@@ -248,7 +249,7 @@ private static bool TryGetPrimitiveOrEnumPropertyValue(ODataResourceBase resourc
{
if (isRequired)
{
- throw new ODataException(Strings.EdmValueUtils_PropertyDoesntExist(GetResourceTypeName(resource, entityType), propertyName));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_PropertyDoesntExist, GetResourceTypeName(resource, entityType), propertyName));
}
else
{
@@ -274,7 +275,7 @@ private static object GetPrimitiveOrEnumPropertyValue(ODataResourceBase resource
object propertyValue = (propertyInfo as ODataProperty)?.Value;
if (propertyValue == null && validateNotNull)
{
- throw new ODataException(Strings.ODataResourceMetadataContext_NullKeyValue(propertyInfo.Name, GetResourceTypeName(resource, entityType)));
+ throw new ODataException(Error.Format(SRResources.ODataResourceMetadataContext_NullKeyValue, propertyInfo.Name, GetResourceTypeName(resource, entityType)));
}
if (propertyValue is ODataValue && !(propertyValue is ODataEnumValue))
@@ -284,7 +285,7 @@ private static object GetPrimitiveOrEnumPropertyValue(ODataResourceBase resource
return propertyValue;
}
- throw new ODataException(Strings.ODataResourceMetadataContext_KeyOrETagValuesMustBePrimitiveValues(propertyInfo.Name, GetResourceTypeName(resource, entityType)));
+ throw new ODataException(Error.Format(SRResources.ODataResourceMetadataContext_KeyOrETagValuesMustBePrimitiveValues, propertyInfo.Name, GetResourceTypeName(resource, entityType)));
}
return propertyValue;
@@ -304,7 +305,7 @@ private static bool ValidateEntityTypeHasKeyProperties(IList ComputeETagPropertiesFromAnnotation(
IEdmStructuralProperty property = this.actualResourceType.StructuralProperties().FirstOrDefault(p => p.Name == pathExpression.PathSegments.LastOrDefault());
if (property == null)
{
- throw new ODataException(Strings.EdmValueUtils_PropertyDoesntExist(this.ActualResourceTypeName, pathExpression.PathSegments.LastOrDefault()));
+ throw new ODataException(Error.Format(SRResources.EdmValueUtils_PropertyDoesntExist, this.ActualResourceTypeName, pathExpression.PathSegments.LastOrDefault()));
}
yield return property;
diff --git a/src/Microsoft.OData.Core/ExceptionUtils.cs b/src/Microsoft.OData.Core/ExceptionUtils.cs
index 4f5c2283f0..58ec0a878b 100644
--- a/src/Microsoft.OData.Core/ExceptionUtils.cs
+++ b/src/Microsoft.OData.Core/ExceptionUtils.cs
@@ -7,6 +7,7 @@
#if ODATA_CLIENT
namespace Microsoft.OData.Client.ALinq.UriParser
#else
+using Microsoft.OData.Core;
namespace Microsoft.OData
#endif
{
@@ -80,7 +81,7 @@ internal static void CheckArgumentStringNotEmpty(string value, string parameterN
if (value != null && value.Length == 0)
{
#if !ODATA_CLIENT
- throw new ArgumentException(Strings.ExceptionUtils_ArgumentStringEmpty, parameterName);
+ throw new ArgumentException(SRResources.ExceptionUtils_ArgumentStringEmpty, parameterName);
#endif
}
}
@@ -98,7 +99,7 @@ internal static void CheckArgumentStringNotNullOrEmpty([ValidatedNotNull] string
if (string.IsNullOrEmpty(value))
{
#if !ODATA_CLIENT
- throw new ArgumentNullException(parameterName, Strings.ExceptionUtils_ArgumentStringNullOrEmpty);
+ throw new ArgumentNullException(parameterName, SRResources.ExceptionUtils_ArgumentStringNullOrEmpty);
#endif
}
}
@@ -116,7 +117,7 @@ internal static void CheckIntegerNotNegative(int value, string parameterName)
if (value < 0)
{
#if !ODATA_CLIENT
- throw new ArgumentOutOfRangeException(parameterName, Strings.ExceptionUtils_CheckIntegerNotNegative(value));
+ throw new ArgumentOutOfRangeException(parameterName, Error.Format(SRResources.ExceptionUtils_CheckIntegerNotNegative, value));
#endif
}
}
@@ -134,7 +135,7 @@ internal static void CheckIntegerPositive(int value, string parameterName)
if (value <= 0)
{
#if !ODATA_CLIENT
- throw new ArgumentOutOfRangeException(parameterName, Strings.ExceptionUtils_CheckIntegerPositive(value));
+ throw new ArgumentOutOfRangeException(parameterName, Error.Format(SRResources.ExceptionUtils_CheckIntegerPositive, value));
#endif
}
}
@@ -152,7 +153,7 @@ internal static void CheckLongPositive(long value, string parameterName)
if (value <= 0)
{
#if !ODATA_CLIENT
- throw new ArgumentOutOfRangeException(parameterName, Strings.ExceptionUtils_CheckLongPositive(value));
+ throw new ArgumentOutOfRangeException(parameterName, Error.Format(SRResources.ExceptionUtils_CheckLongPositive, value));
#endif
}
}
@@ -178,7 +179,7 @@ internal static void CheckArgumentCollectionNotNullOrEmpty(ICollection val
{
#if !ODATA_CLIENT
// TODO: STRINGS The string is fine; just rename it to just ArgumentEmpty
- throw new ArgumentException(Strings.ExceptionUtils_ArgumentStringEmpty, parameterName);
+ throw new ArgumentException(SRResources.ExceptionUtils_ArgumentStringEmpty, parameterName);
#endif
}
}
diff --git a/src/Microsoft.OData.Core/HttpHeaderValueLexer.cs b/src/Microsoft.OData.Core/HttpHeaderValueLexer.cs
index 8baeb59eee..e9510d52f7 100644
--- a/src/Microsoft.OData.Core/HttpHeaderValueLexer.cs
+++ b/src/Microsoft.OData.Core/HttpHeaderValueLexer.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -278,7 +279,7 @@ private HttpHeaderValueLexer ReadNextTokenOrQuotedString()
// Instead of testing whether result is null or empty, we check to see if the index have moved forward because we can encounter the empty quoted string "".
if (index == this.startIndexOfNextItem)
{
- throw new ODataException(Strings.HttpHeaderValueLexer_FailedToReadTokenOrQuotedString(this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem));
+ throw new ODataException(Error.Format(SRResources.HttpHeaderValueLexer_FailedToReadTokenOrQuotedString, this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem));
}
if (isQuotedString)
@@ -299,7 +300,7 @@ private HttpHeaderToken ReadNextToken()
HttpHeaderValueLexer item = this.ReadNextTokenOrQuotedString();
if (item.Type == HttpHeaderValueItemType.QuotedString)
{
- throw new ODataException(Strings.HttpHeaderValueLexer_TokenExpectedButFoundQuotedString(this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem));
+ throw new ODataException(Error.Format(SRResources.HttpHeaderValueLexer_TokenExpectedButFoundQuotedString, this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem));
}
return (HttpHeaderToken)item;
@@ -316,7 +317,7 @@ private HttpHeaderSeparator ReadNextSeparator()
ReadOnlySpan span = separator.Span;
if (!span.Equals(ElementSeparator, StringComparison.Ordinal) && !span.Equals(ParameterSeparator, StringComparison.Ordinal) && !span.Equals(ValueSeparator, StringComparison.Ordinal))
{
- throw new ODataException(Strings.HttpHeaderValueLexer_UnrecognizedSeparator(this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem, separator));
+ throw new ODataException(Error.Format(SRResources.HttpHeaderValueLexer_UnrecognizedSeparator, this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem, separator));
}
return new HttpHeaderSeparator(this.httpHeaderName, this.httpHeaderValue, separator, this.startIndexOfNextItem + 1);
@@ -466,7 +467,7 @@ internal override HttpHeaderValueLexer ReadNext()
return separator;
}
- throw new ODataException(Strings.HttpHeaderValueLexer_InvalidSeparatorAfterQuotedString(this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem, separator.Value));
+ throw new ODataException(Error.Format(SRResources.HttpHeaderValueLexer_InvalidSeparatorAfterQuotedString, this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem, separator.Value));
}
}
@@ -534,7 +535,7 @@ internal override HttpHeaderValueLexer ReadNext()
{
if (this.EndOfHeaderValue())
{
- throw new ODataException(Strings.HttpHeaderValueLexer_EndOfFileAfterSeparator(this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem, this.originalText));
+ throw new ODataException(Error.Format(SRResources.HttpHeaderValueLexer_EndOfFileAfterSeparator, this.httpHeaderName, this.httpHeaderValue, this.startIndexOfNextItem, this.originalText));
}
// Token or quoted-string can come after '='. i.e. token ['=' (token | quoted-string)]
diff --git a/src/Microsoft.OData.Core/HttpUtils.cs b/src/Microsoft.OData.Core/HttpUtils.cs
index 3d9e0b097c..be6bc3dbff 100644
--- a/src/Microsoft.OData.Core/HttpUtils.cs
+++ b/src/Microsoft.OData.Core/HttpUtils.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -29,13 +30,13 @@ internal static IList> ReadMimeType(string contentT
{
if (String.IsNullOrEmpty(contentType))
{
- throw new ODataContentTypeException(Strings.HttpUtils_ContentTypeMissing);
+ throw new ODataContentTypeException(SRResources.HttpUtils_ContentTypeMissing);
}
IList> mediaTypes = ReadMediaTypes(contentType);
if (mediaTypes.Count != 1)
{
- throw new ODataContentTypeException(Strings.HttpUtils_NoOrMoreThanOneContentTypeSpecified(contentType));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_NoOrMoreThanOneContentTypeSpecified, contentType));
}
ODataMediaType mediaType = mediaTypes[0].Key;
@@ -207,7 +208,7 @@ internal static void ReadQualityValue(string text, ref int textIndex, out int qu
qualityValue = 1;
break;
default:
- throw new ODataContentTypeException(Strings.HttpUtils_InvalidQualityValueStartChar(text, digit));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_InvalidQualityValueStartChar, text, digit));
}
if (textIndex < text.Length && text[textIndex] == '.')
@@ -236,7 +237,7 @@ internal static void ReadQualityValue(string text, ref int textIndex, out int qu
if (qualityValue > 1000)
{
// Too high of a value in qvalue.
- throw new ODataContentTypeException(Strings.HttpUtils_InvalidQualityValue(qualityValue / 1000, text));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_InvalidQualityValue, qualityValue / 1000, text));
}
}
else
@@ -259,7 +260,7 @@ internal static void ValidateHttpMethod(string httpMethodString)
&& string.CompareOrdinal(httpMethodString, ODataConstants.MethodPost) != 0
&& string.CompareOrdinal(httpMethodString, ODataConstants.MethodPut) != 0)
{
- throw new ODataException(Strings.HttpUtils_InvalidHttpMethodString(httpMethodString));
+ throw new ODataException(Error.Format(SRResources.HttpUtils_InvalidHttpMethodString, httpMethodString));
}
}
@@ -468,7 +469,7 @@ internal static ReadOnlyMemory ReadTokenOrQuotedStringValue(string headerN
if (textIndex >= headerText.Length)
{
- throw createException(Strings.HttpUtils_EscapeCharAtEnd(headerName, headerText, textIndex, currentChar));
+ throw createException(Error.Format(SRResources.HttpUtils_EscapeCharAtEnd, headerName, headerText, textIndex, currentChar));
}
currentChar = headerText[textIndex]; // only save the char after '\'? not unescape it? or it's never used?
@@ -477,7 +478,7 @@ internal static ReadOnlyMemory ReadTokenOrQuotedStringValue(string headerN
{
if (!IsValidInQuotedHeaderValue(currentChar))
{
- throw createException(Strings.HttpUtils_InvalidCharacterInQuotedParameterValue(headerName, headerText, textIndex, currentChar));
+ throw createException(Error.Format(SRResources.HttpUtils_InvalidCharacterInQuotedParameterValue, headerName, headerText, textIndex, currentChar));
}
}
@@ -491,7 +492,7 @@ internal static ReadOnlyMemory ReadTokenOrQuotedStringValue(string headerN
if (currentChar != '\"')
{
- throw createException(Strings.HttpUtils_ClosingQuoteNotFound(headerName, headerText, textIndex));
+ throw createException(Error.Format(SRResources.HttpUtils_ClosingQuoteNotFound, headerName, headerText, textIndex));
}
if (parameterValue != null)
@@ -521,7 +522,7 @@ private static ReadOnlyMemory ReadTokenValue(string headerName, string hea
currentChar = headerText[textIndex];
if (currentChar == '\\' || currentChar == '\"')
{
- throw createException(Strings.HttpUtils_EscapeCharWithoutQuotes(headerName, headerText, textIndex, currentChar));
+ throw createException(Error.Format(SRResources.HttpUtils_EscapeCharWithoutQuotes, headerName, headerText, textIndex, currentChar));
}
else if (!IsHttpToken(currentChar))
{
@@ -592,7 +593,7 @@ private static IEnumerable AcceptCharsetParts(string headerValue)
if (commaRequired)
{
// Comma missing between charset elements.
- throw new ODataContentTypeException(Strings.HttpUtils_MissingSeparatorBetweenCharsets(headerValue));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MissingSeparatorBetweenCharsets, headerValue));
}
headerStart = headerIndex;
@@ -602,7 +603,7 @@ private static IEnumerable AcceptCharsetParts(string headerValue)
if (headerNameEnd == headerIndex)
{
// Invalid (empty) charset name.
- throw new ODataContentTypeException(Strings.HttpUtils_InvalidCharsetName(headerValue));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_InvalidCharsetName, headerValue));
}
if (endReached)
@@ -620,7 +621,7 @@ private static IEnumerable AcceptCharsetParts(string headerValue)
if (ReadLiteral(headerValue, headerNameEnd, ";q="))
{
// Unexpected end of qvalue.
- throw new ODataContentTypeException(Strings.HttpUtils_UnexpectedEndOfQValue(headerValue));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_UnexpectedEndOfQValue, headerValue));
}
headerEnd = headerNameEnd + 3;
@@ -635,7 +636,7 @@ private static IEnumerable AcceptCharsetParts(string headerValue)
else
{
// Invalid separator character.
- throw new ODataContentTypeException(Strings.HttpUtils_InvalidSeparatorBetweenCharsets(headerValue));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_InvalidSeparatorBetweenCharsets, headerValue));
}
}
@@ -676,7 +677,7 @@ private static IList> ReadMediaTypes(string
if (text[textIndex] != ';')
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeRequiresSemicolonBeforeParameter(text));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MediaTypeRequiresSemicolonBeforeParameter, text));
}
textIndex++;
@@ -713,17 +714,17 @@ private static void ReadMediaTypeParameter(string text, ref int textIndex, ref L
if (parameterName.Length == 0)
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeMissingParameterName);
+ throw new ODataContentTypeException(SRResources.HttpUtils_MediaTypeMissingParameterName);
}
if (eof)
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeMissingParameterValue(parameterName));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MediaTypeMissingParameterValue, parameterName));
}
if (text[textIndex] != '=')
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeMissingParameterValue(parameterName));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MediaTypeMissingParameterValue, parameterName));
}
textIndex++;
@@ -758,12 +759,12 @@ private static void ReadMediaTypeAndSubtype(string mediaTypeName, ref int textIn
int textStart = textIndex;
if (ReadToken(mediaTypeName, ref textIndex))
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeUnspecified(mediaTypeName));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MediaTypeUnspecified, mediaTypeName));
}
if (mediaTypeName[textIndex] != '/')
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeRequiresSlash(mediaTypeName));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MediaTypeRequiresSlash, mediaTypeName));
}
type = mediaTypeName.Substring(textStart, textIndex - textStart);
@@ -774,7 +775,7 @@ private static void ReadMediaTypeAndSubtype(string mediaTypeName, ref int textIn
if (textIndex == subTypeStart)
{
- throw new ODataContentTypeException(Strings.HttpUtils_MediaTypeRequiresSubType(mediaTypeName));
+ throw new ODataContentTypeException(Error.Format(SRResources.HttpUtils_MediaTypeRequiresSubType, mediaTypeName));
}
subType = mediaTypeName.Substring(subTypeStart, textIndex - subTypeStart);
@@ -866,7 +867,7 @@ private static int DigitToInt32(char c)
return -1;
}
- throw new ODataException(Strings.HttpUtils_CannotConvertCharToInt(c));
+ throw new ODataException(Error.Format(SRResources.HttpUtils_CannotConvertCharToInt, c));
}
///
@@ -893,7 +894,7 @@ private static bool ReadLiteral(string text, int textIndex, string literal)
if (String.Compare(text, textIndex, literal, 0, literal.Length, StringComparison.Ordinal) != 0)
{
// Failed to find expected literal.
- throw new ODataException(Strings.HttpUtils_ExpectedLiteralNotFoundInString(literal, textIndex, text));
+ throw new ODataException(Error.Format(SRResources.HttpUtils_ExpectedLiteralNotFoundInString, literal, textIndex, text));
}
return textIndex + literal.Length == text.Length;
diff --git a/src/Microsoft.OData.Core/Json/JsonFullMetadataLevel.cs b/src/Microsoft.OData.Core/Json/JsonFullMetadataLevel.cs
index bf16fc104b..ca730873ea 100644
--- a/src/Microsoft.OData.Core/Json/JsonFullMetadataLevel.cs
+++ b/src/Microsoft.OData.Core/Json/JsonFullMetadataLevel.cs
@@ -10,6 +10,7 @@ namespace Microsoft.OData.Json
using System;
using System.Collections.Generic;
using System.Diagnostics;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Evaluation;
@@ -56,7 +57,7 @@ private Uri NonNullMetadataDocumentUri
{
if (this.metadataDocumentUri == null)
{
- throw new ODataException(Strings.ODataOutputContext_MetadataDocumentUriMissing);
+ throw new ODataException(SRResources.ODataOutputContext_MetadataDocumentUriMissing);
}
return this.metadataDocumentUri;
diff --git a/src/Microsoft.OData.Core/Json/JsonInstanceAnnotationWriter.cs b/src/Microsoft.OData.Core/Json/JsonInstanceAnnotationWriter.cs
index 44661357bf..7a147cec92 100644
--- a/src/Microsoft.OData.Core/Json/JsonInstanceAnnotationWriter.cs
+++ b/src/Microsoft.OData.Core/Json/JsonInstanceAnnotationWriter.cs
@@ -12,9 +12,9 @@ namespace Microsoft.OData
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.OData.Edm;
+ using Microsoft.OData.Core;
using Microsoft.OData.Json;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
#endregion
///
@@ -171,7 +171,7 @@ internal void WriteInstanceAnnotation(
if (expectedType != null && !expectedType.IsNullable)
{
throw new ODataException(
- ODataErrorStrings.JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation(
+ Error.Format(SRResources.JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation,
instanceAnnotation.Name, expectedType.FullName()));
}
@@ -384,7 +384,7 @@ internal async Task WriteInstanceAnnotationAsync(
if (expectedType != null && !expectedType.IsNullable)
{
throw new ODataException(
- ODataErrorStrings.JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation(
+ Error.Format(SRResources.JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation,
annotationName, expectedType.FullName()));
}
@@ -495,7 +495,7 @@ private void WriteAndTrackInstanceAnnotation(
if (!instanceAnnotationNames.Add(annotation.Name))
{
- throw new ODataException(ODataErrorStrings.JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection(annotation.Name));
+ throw new ODataException(Error.Format(SRResources.JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection, annotation.Name));
}
if (!tracker.IsAnnotationWritten(annotation.Name)
@@ -550,7 +550,7 @@ private async Task WriteAndTrackInstanceAnnotationAsync(
{
if (!instanceAnnotationNames.Add(annotation.Name))
{
- throw new ODataException(ODataErrorStrings.JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection(annotation.Name));
+ throw new ODataException(Error.Format(SRResources.JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection, annotation.Name));
}
if (!tracker.IsAnnotationWritten(annotation.Name)
diff --git a/src/Microsoft.OData.Core/Json/JsonReader.cs b/src/Microsoft.OData.Core/Json/JsonReader.cs
index 8591c99e3d..bf79be8840 100644
--- a/src/Microsoft.OData.Core/Json/JsonReader.cs
+++ b/src/Microsoft.OData.Core/Json/JsonReader.cs
@@ -16,6 +16,7 @@ namespace Microsoft.OData.Json
using System.Text;
using System.Threading.Tasks;
using Microsoft.OData.Buffers;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -211,7 +212,7 @@ public virtual object GetValue()
{
if (this.readingStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotAccessValueInStreamState);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotAccessValueInStreamState);
}
if (this.canStream)
@@ -279,7 +280,7 @@ public virtual bool Read()
{
if (this.readingStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotCallReadInStreamState);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotCallReadInStreamState);
}
if (this.canStream)
@@ -345,13 +346,13 @@ public virtual bool Read()
case ScopeType.Root:
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Root));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Root));
}
if (currentScope.ValueCount > 0)
{
// We already found the top-level value, so fail
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MultipleTopLevelValues);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_MultipleTopLevelValues);
}
// We expect a "value" - start array, start object or primitive value
@@ -361,7 +362,7 @@ public virtual bool Read()
case ScopeType.Array:
if (commaFound && currentScope.ValueCount == 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Array));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Array));
}
// We might see end of array here
@@ -372,7 +373,7 @@ public virtual bool Read()
// End of array is only valid when there was no comma before it.
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Array));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Array));
}
this.PopScope();
@@ -382,7 +383,7 @@ public virtual bool Read()
if (!commaFound && currentScope.ValueCount > 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MissingComma(ScopeType.Array));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_MissingComma, ScopeType.Array));
}
// We expect element which is a "value" - start array, start object or primitive value
@@ -392,7 +393,7 @@ public virtual bool Read()
case ScopeType.Object:
if (commaFound && currentScope.ValueCount == 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Object));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Object));
}
// We might see end of object here
@@ -403,7 +404,7 @@ public virtual bool Read()
// End of object is only valid when there was no comma before it.
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Object));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Object));
}
this.PopScope();
@@ -414,7 +415,7 @@ public virtual bool Read()
{
if (!commaFound && currentScope.ValueCount > 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MissingComma(ScopeType.Object));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_MissingComma, ScopeType.Object));
}
// We expect a property here
@@ -425,7 +426,7 @@ public virtual bool Read()
case ScopeType.Property:
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Property));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Property));
}
// We expect the property value, which is a "value" - start array, start object or primitive value
@@ -433,7 +434,7 @@ public virtual bool Read()
break;
default:
- throw JsonReaderExtensions.CreateException(Strings.General_InternalError(InternalErrorCodes.JsonReader_Read));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.JsonReader_Read));
}
Debug.Assert(
@@ -451,7 +452,7 @@ public Stream CreateReadStream()
{
if (!this.canStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotCreateReadStream);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotCreateReadStream);
}
this.canStream = false;
@@ -476,7 +477,7 @@ public TextReader CreateTextReader()
{
if (!this.canStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotCreateTextReader);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotCreateTextReader);
}
this.canStream = false;
@@ -521,7 +522,7 @@ public virtual async Task GetValueAsync()
{
if (this.readingStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotAccessValueInStreamState);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotAccessValueInStreamState);
}
if (this.canStream)
@@ -578,7 +579,7 @@ public virtual async Task ReadAsync()
{
if (this.readingStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotCallReadInStreamState);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotCallReadInStreamState);
}
if (this.canStream)
@@ -644,13 +645,13 @@ public virtual async Task ReadAsync()
case ScopeType.Root:
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Root));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Root));
}
if (currentScope.ValueCount > 0)
{
// We already found the top-level value, so fail
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MultipleTopLevelValues);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_MultipleTopLevelValues);
}
// We expect a "value" - start array, start object or primitive value
@@ -661,7 +662,7 @@ public virtual async Task ReadAsync()
case ScopeType.Array:
if (commaFound && currentScope.ValueCount == 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Array));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Array));
}
// We might see end of array here
@@ -672,7 +673,7 @@ public virtual async Task ReadAsync()
// End of array is only valid when there was no comma before it.
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Array));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Array));
}
this.PopScope();
@@ -682,7 +683,7 @@ public virtual async Task ReadAsync()
if (!commaFound && currentScope.ValueCount > 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MissingComma(ScopeType.Array));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_MissingComma, ScopeType.Array));
}
// We expect element which is a "value" - start array, start object or primitive value
@@ -693,7 +694,7 @@ public virtual async Task ReadAsync()
case ScopeType.Object:
if (commaFound && currentScope.ValueCount == 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Object));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Object));
}
// We might see end of object here
@@ -704,7 +705,7 @@ public virtual async Task ReadAsync()
// End of object is only valid when there was no comma before it.
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Object));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Object));
}
this.PopScope();
@@ -715,7 +716,7 @@ public virtual async Task ReadAsync()
{
if (!commaFound && currentScope.ValueCount > 0)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MissingComma(ScopeType.Object));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_MissingComma, ScopeType.Object));
}
// We expect a property here
@@ -727,7 +728,7 @@ public virtual async Task ReadAsync()
case ScopeType.Property:
if (commaFound)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedComma(ScopeType.Property));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedComma, ScopeType.Property));
}
// We expect the property value, which is a "value" - start array, start object or primitive value
@@ -736,7 +737,7 @@ public virtual async Task ReadAsync()
break;
default:
- throw JsonReaderExtensions.CreateException(Strings.General_InternalError(InternalErrorCodes.JsonReader_Read));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.JsonReader_Read));
}
Debug.Assert(
@@ -755,7 +756,7 @@ public async Task CreateReadStreamAsync()
{
if (!this.canStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotCreateReadStream);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotCreateReadStream);
}
this.canStream = false;
@@ -783,7 +784,7 @@ public async Task CreateTextReaderAsync()
{
if (!this.canStream)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_CannotCreateTextReader);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_CannotCreateTextReader);
}
this.canStream = false;
@@ -915,7 +916,7 @@ private JsonNodeType ParseValue()
else
{
// Unknown token - fail.
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedToken);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_UnrecognizedToken);
}
}
@@ -941,13 +942,13 @@ private JsonNodeType ParseProperty()
if (string.IsNullOrEmpty((string)this.nodeValue))
{
// The name can't be empty.
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_InvalidPropertyNameOrUnexpectedComma((string)this.nodeValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_InvalidPropertyNameOrUnexpectedComma, (string)this.nodeValue));
}
if (!this.SkipWhitespaces() || this.characterBuffer[this.tokenStartIndex] != ':')
{
// We need the colon character after the property name
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MissingColon((string)this.nodeValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_MissingColon, (string)this.nodeValue));
}
// Consume the colon.
@@ -1039,7 +1040,7 @@ private string ParseStringPrimitiveValue(out bool hasLeadingBackslash)
// Escape sequence - we need at least two characters, the backslash and the one character after it.
if (!this.EnsureAvailableCharacters(2))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\"));
}
// To simplify the code, consume the character after the \ as well, since that is the start of the escape sequence.
@@ -1075,20 +1076,20 @@ private string ParseStringPrimitiveValue(out bool hasLeadingBackslash)
// We need 4 hex characters
if (!this.EnsureAvailableCharacters(4))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\uXXXX"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\uXXXX"));
}
string unicodeHexValue = this.ConsumeTokenToString(4);
int characterValue;
if (!Int32.TryParse(unicodeHexValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out characterValue))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\u" + unicodeHexValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\u" + unicodeHexValue));
}
valueBuilder.Append((char)characterValue);
break;
default:
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\" + character));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\" + character));
}
}
else if (character == openingQuoteCharacter)
@@ -1118,7 +1119,7 @@ private string ParseStringPrimitiveValue(out bool hasLeadingBackslash)
}
}
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedEndOfString);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_UnexpectedEndOfString);
}
///
@@ -1137,7 +1138,7 @@ private object ParseNullPrimitiveValue()
if (!string.Equals(token, JsonConstants.JsonNullLiteral, StringComparison.Ordinal))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedToken(token));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedToken, token));
}
return null;
@@ -1167,7 +1168,7 @@ private object ParseBooleanPrimitiveValue()
return true;
}
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedToken(token));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedToken, token));
}
///
@@ -1227,7 +1228,7 @@ private object ParseNumberPrimitiveValue()
return doubleValue;
}
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_InvalidNumberFormat(numberString));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_InvalidNumberFormat, numberString));
}
///
@@ -1327,7 +1328,7 @@ private int ReadChars(char[] chars, int offset, int maxLength)
this.tokenStartIndex++;
if (!this.EnsureAvailableCharacters(1))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\uXXXX"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\uXXXX"));
}
character = this.characterBuffer[this.tokenStartIndex];
@@ -1363,7 +1364,7 @@ private int ReadChars(char[] chars, int offset, int maxLength)
// We need 4 hex characters
if (!this.EnsureAvailableCharacters(4))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\uXXXX"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\uXXXX"));
}
int characterValue = ParseUnicodeHexValue();
@@ -1373,7 +1374,7 @@ private int ReadChars(char[] chars, int offset, int maxLength)
advance = false;
break;
default:
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\" + character));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\" + character));
}
}
@@ -1389,7 +1390,7 @@ private int ReadChars(char[] chars, int offset, int maxLength)
// we reached the end of the file without finding a closing quote character
if (charsRead < maxLength)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedEndOfString);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_UnexpectedEndOfString);
}
return charsRead;
@@ -1418,7 +1419,7 @@ private bool EndOfInput()
if (this.scopes.Count > 1)
{
// Not all open scopes were closed.
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_EndOfInputWithOpenScope);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_EndOfInputWithOpenScope);
}
Debug.Assert(
@@ -1657,7 +1658,7 @@ private async Task ParseValueAsync()
else
{
// Unknown token - fail.
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedToken);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_UnrecognizedToken);
}
}
@@ -1684,13 +1685,13 @@ private async Task ParsePropertyAsync()
if (string.IsNullOrEmpty((string)this.nodeValue))
{
// The name can't be empty.
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_InvalidPropertyNameOrUnexpectedComma((string)this.nodeValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_InvalidPropertyNameOrUnexpectedComma, (string)this.nodeValue));
}
if (!await this.SkipWhitespacesAsync().ConfigureAwait(false) || this.characterBuffer[this.tokenStartIndex] != ':')
{
// We need the colon character after the property name
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MissingColon((string)this.nodeValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_MissingColon, (string)this.nodeValue));
}
// Consume the colon.
@@ -1771,7 +1772,7 @@ private async Task> ParseStringPrimitiveValueAsync()
// Escape sequence - we need at least two characters, the backslash and the one character after it.
if (!await this.EnsureAvailableCharactersAsync(2).ConfigureAwait(false))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\"));
}
// To simplify the code, consume the character after the \ as well, since that is the start of the escape sequence.
@@ -1807,20 +1808,20 @@ private async Task> ParseStringPrimitiveValueAsync()
// We need 4 hex characters
if (!await this.EnsureAvailableCharactersAsync(4).ConfigureAwait(false))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\uXXXX"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\uXXXX"));
}
string unicodeHexValue = this.ConsumeTokenToString(4);
int characterValue;
if (!Int32.TryParse(unicodeHexValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out characterValue))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\u" + unicodeHexValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\u" + unicodeHexValue));
}
valueBuilder.Append((char)characterValue);
break;
default:
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\" + character));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\" + character));
}
}
else if (character == openingQuoteCharacter)
@@ -1851,7 +1852,7 @@ private async Task> ParseStringPrimitiveValueAsync()
}
}
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedEndOfString);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_UnexpectedEndOfString);
}
///
@@ -1871,7 +1872,7 @@ private async Task ParseNullPrimitiveValueAsync()
if (!string.Equals(token, JsonConstants.JsonNullLiteral, StringComparison.Ordinal))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedToken(token));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedToken, token));
}
return null;
@@ -1902,7 +1903,7 @@ private async Task ParseBooleanPrimitiveValueAsync()
return true;
}
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedToken(token));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnexpectedToken, token));
}
///
@@ -1963,7 +1964,7 @@ private async Task ParseNumberPrimitiveValueAsync()
return doubleValue;
}
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_InvalidNumberFormat(numberString));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_InvalidNumberFormat, numberString));
}
///
@@ -2067,7 +2068,7 @@ private async Task ReadCharsAsync(char[] chars, int offset, int maxLength)
this.tokenStartIndex++;
if (!await this.EnsureAvailableCharactersAsync(1).ConfigureAwait(false))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\uXXXX"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\uXXXX"));
}
character = this.characterBuffer[this.tokenStartIndex];
@@ -2103,7 +2104,7 @@ private async Task ReadCharsAsync(char[] chars, int offset, int maxLength)
// We need 4 hex characters
if (!await this.EnsureAvailableCharactersAsync(4).ConfigureAwait(false))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\uXXXX"));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\uXXXX"));
}
int characterValue = ParseUnicodeHexValue();
@@ -2113,7 +2114,7 @@ private async Task ReadCharsAsync(char[] chars, int offset, int maxLength)
advance = false;
break;
default:
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\" + character));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\" + character));
}
}
@@ -2129,7 +2130,7 @@ private async Task ReadCharsAsync(char[] chars, int offset, int maxLength)
// we reached the end of the file without finding a closing quote character
if (charsRead < maxLength)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnexpectedEndOfString);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_UnexpectedEndOfString);
}
return charsRead;
@@ -2243,7 +2244,7 @@ private void CopyInputToBuffer()
// We need to grow the buffer. Double the size of the buffer.
if (this.characterBuffer.Length == int.MaxValue)
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_MaxBufferReached);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_MaxBufferReached);
}
int newBufferSize = this.characterBuffer.Length * 2;
@@ -2287,7 +2288,7 @@ private int ParseUnicodeHexValue()
int characterValue;
if (!Int32.TryParse(unicodeHexValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out characterValue))
{
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_UnrecognizedEscapeSequence("\\u" + unicodeHexValue));
+ throw JsonReaderExtensions.CreateException(Error.Format(SRResources.JsonReader_UnrecognizedEscapeSequence, "\\u" + unicodeHexValue));
}
return characterValue;
diff --git a/src/Microsoft.OData.Core/Json/JsonReaderExtensions.cs b/src/Microsoft.OData.Core/Json/JsonReaderExtensions.cs
index e55279e5a5..84a997b0bc 100644
--- a/src/Microsoft.OData.Core/Json/JsonReaderExtensions.cs
+++ b/src/Microsoft.OData.Core/Json/JsonReaderExtensions.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -130,7 +131,7 @@ internal static string ReadStringValue(this IJsonReader jsonReader)
return stringValue;
}
- throw CreateException(Strings.JsonReaderExtensions_CannotReadValueAsString(value));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_CannotReadValueAsString, value));
}
///
@@ -160,7 +161,7 @@ internal static string ReadStringValue(this IJsonReader jsonReader, string prope
return stringValue;
}
- throw CreateException(Strings.JsonReaderExtensions_CannotReadPropertyValueAsString(value, propertyName));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_CannotReadPropertyValueAsString, value, propertyName));
}
///
@@ -191,7 +192,7 @@ internal static string ReadStringValue(this IJsonReader jsonReader, string prope
return (double)decimalValue;
}
- throw CreateException(Strings.JsonReaderExtensions_CannotReadValueAsDouble(value));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_CannotReadValueAsDouble, value));
}
///
@@ -234,7 +235,7 @@ internal static void SkipValue(this IJsonReader jsonReader)
{
// Not all open scopes were closed:
// "Invalid JSON. Unexpected end of input was found in JSON content. Not all object and array scopes were closed."
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_EndOfInputWithOpenScope);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_EndOfInputWithOpenScope);
}
}
@@ -308,7 +309,7 @@ internal static void SkipValue(this IJsonReader jsonReader, StringBuilder jsonRa
{
// Not all open scopes were closed:
// "Invalid JSON. Unexpected end of input was found in JSON content. Not all object and array scopes were closed."
- throw JsonReaderExtensions.CreateException(Strings.JsonReader_EndOfInputWithOpenScope);
+ throw JsonReaderExtensions.CreateException(SRResources.JsonReader_EndOfInputWithOpenScope);
}
jsonWriter.Flush();
@@ -584,11 +585,11 @@ internal static async Task ReadStringValueAsync(this IJsonReader jsonRea
if (!string.IsNullOrEmpty(propertyName))
{
- throw CreateException(Strings.JsonReaderExtensions_CannotReadPropertyValueAsString(value, propertyName));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_CannotReadPropertyValueAsString, value, propertyName));
}
else
{
- throw CreateException(Strings.JsonReaderExtensions_CannotReadValueAsString(value));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_CannotReadValueAsString, value));
}
}
@@ -637,7 +638,7 @@ internal static async Task ReadUriValueAsync(this IJsonReader jsonReader)
return (double)decimalValue;
}
- throw CreateException(Strings.JsonReaderExtensions_CannotReadValueAsDouble(value));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_CannotReadValueAsDouble, value));
}
///
@@ -682,7 +683,7 @@ internal static async Task SkipValueAsync(this IJsonReader jsonReader)
{
// Not all open scopes were closed:
// "Invalid JSON. Unexpected end of input was found in JSON content. Not all object and array scopes were closed."
- throw CreateException(Strings.JsonReader_EndOfInputWithOpenScope);
+ throw CreateException(SRResources.JsonReader_EndOfInputWithOpenScope);
}
}
@@ -766,7 +767,7 @@ await jsonWriter.WriteNameAsync(propertyName)
{
// Not all open scopes were closed:
// "Invalid JSON. Unexpected end of input was found in JSON content. Not all object and array scopes were closed."
- throw CreateException(Strings.JsonReader_EndOfInputWithOpenScope);
+ throw CreateException(SRResources.JsonReader_EndOfInputWithOpenScope);
}
await jsonWriter.FlushAsync()
@@ -947,7 +948,7 @@ private static void ValidateNodeType(this IJsonReader jsonReader, JsonNodeType e
if (jsonReader.NodeType != expectedNodeType)
{
- throw CreateException(Strings.JsonReaderExtensions_UnexpectedNodeDetected(expectedNodeType, jsonReader.NodeType));
+ throw CreateException(Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetected, expectedNodeType, jsonReader.NodeType));
}
}
diff --git a/src/Microsoft.OData.Core/Json/JsonValueUtils.cs b/src/Microsoft.OData.Core/Json/JsonValueUtils.cs
index 87c2150036..6b0f18c892 100644
--- a/src/Microsoft.OData.Core/Json/JsonValueUtils.cs
+++ b/src/Microsoft.OData.Core/Json/JsonValueUtils.cs
@@ -15,6 +15,7 @@ namespace Microsoft.OData.Json
using System.Text;
using System.Xml;
using Microsoft.OData.Buffers;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
#endregion Namespaces
@@ -249,7 +250,7 @@ internal static string FormatDateTimeOffset(DateTimeOffset value, ODataJsonDateT
return FormatDateTimeAsJsonTicksString(value);
}
default:
- throw new ODataException(Strings.ODataJsonWriter_UnsupportedDateTimeFormat);
+ throw new ODataException(SRResources.ODataJsonWriter_UnsupportedDateTimeFormat);
}
}
diff --git a/src/Microsoft.OData.Core/Json/JsonWriterExtensions.Async.cs b/src/Microsoft.OData.Core/Json/JsonWriterExtensions.Async.cs
index 00e544f096..bc8c54dc8c 100644
--- a/src/Microsoft.OData.Core/Json/JsonWriterExtensions.Async.cs
+++ b/src/Microsoft.OData.Core/Json/JsonWriterExtensions.Async.cs
@@ -14,7 +14,7 @@ namespace Microsoft.OData.Json
using System.Threading.Tasks;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
internal static partial class JsonWriterExtensions
@@ -153,7 +153,7 @@ internal static Task WritePrimitiveValueAsync(this IJsonWriter jsonWriter, objec
}
return TaskUtils.GetFaultedTask(
- new ODataException(ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(value.GetType().FullName)));
+ new ODataException(Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, value.GetType().FullName)));
}
///
@@ -218,7 +218,7 @@ async Task WriteODataCollectionValueAsync(
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonWriter_UnsupportedValueInCollection);
+ throw new ODataException(SRResources.ODataJsonWriter_UnsupportedValueInCollection);
}
}
@@ -227,7 +227,7 @@ async Task WriteODataCollectionValueAsync(
}
return TaskUtils.GetFaultedTask(
- new ODataException(ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(odataValue.GetType().FullName)));
+ new ODataException(Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, odataValue.GetType().FullName)));
}
///
diff --git a/src/Microsoft.OData.Core/Json/JsonWriterExtensions.cs b/src/Microsoft.OData.Core/Json/JsonWriterExtensions.cs
index 686be70805..8dff6a534c 100644
--- a/src/Microsoft.OData.Core/Json/JsonWriterExtensions.cs
+++ b/src/Microsoft.OData.Core/Json/JsonWriterExtensions.cs
@@ -13,7 +13,7 @@ namespace Microsoft.OData.Json
using System.Diagnostics;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -168,7 +168,7 @@ internal static void WritePrimitiveValue(this IJsonWriter jsonWriter, object val
return;
}
- throw new ODataException(ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(value.GetType().FullName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, value.GetType().FullName));
}
///
@@ -221,7 +221,7 @@ internal static void WriteODataValue(this IJsonWriter jsonWriter, ODataValue oda
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonWriter_UnsupportedValueInCollection);
+ throw new ODataException(SRResources.ODataJsonWriter_UnsupportedValueInCollection);
}
}
@@ -231,7 +231,7 @@ internal static void WriteODataValue(this IJsonWriter jsonWriter, ODataValue oda
}
throw new ODataException(
- ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(odataValue.GetType().FullName));
+ Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, odataValue.GetType().FullName));
}
///
diff --git a/src/Microsoft.OData.Core/Json/ODataAnnotationNames.cs b/src/Microsoft.OData.Core/Json/ODataAnnotationNames.cs
index 40ce49be79..bbcefaffd7 100644
--- a/src/Microsoft.OData.Core/Json/ODataAnnotationNames.cs
+++ b/src/Microsoft.OData.Core/Json/ODataAnnotationNames.cs
@@ -10,7 +10,7 @@ namespace Microsoft.OData.Json
using System;
using System.Collections.Generic;
using System.Diagnostics;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -152,7 +152,7 @@ internal static void ValidateIsCustomAnnotationName(string annotationName)
// All other reserved OData instance annotations should fail.
if (KnownODataAnnotationNames.Contains(annotationName))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, annotationName));
}
Debug.Assert(!IsODataAnnotationName(annotationName), "Unknown names under the odata. namespace should be skipped by ODataJsonDeserializer.ParseProperty().");
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonBatchAtomicGroupCache.cs b/src/Microsoft.OData.Core/Json/ODataJsonBatchAtomicGroupCache.cs
index ebd5cd6386..d328ffa1bf 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonBatchAtomicGroupCache.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonBatchAtomicGroupCache.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
@@ -106,7 +107,7 @@ internal bool AddMessageIdAndGroupId(string messageId, string groupId)
}
else
{
- throw new ODataException(Strings.ODataBatchReader_MessageIdPositionedIncorrectly(messageId, groupId));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_MessageIdPositionedIncorrectly, messageId, groupId));
}
return isChangesetStart;
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonBatchBodyContentReaderStream.cs b/src/Microsoft.OData.Core/Json/ODataJsonBatchBodyContentReaderStream.cs
index b907db05be..7869ae1632 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonBatchBodyContentReaderStream.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonBatchBodyContentReaderStream.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
@@ -111,7 +112,7 @@ internal bool PopulateBodyContent(IJsonReader jsonReader, string contentTypeHead
break;
default:
- throw new ODataException(Strings.ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader(contentType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader, contentType));
}
isStreamPopulated = true;
@@ -202,7 +203,7 @@ await WriteBinaryContentAsync(encoded)
break;
default:
- throw new ODataException(Strings.ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader(contentType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader, contentType));
}
isStreamPopulated = true;
@@ -442,7 +443,7 @@ private static void WriteCurrentJsonObject(IJsonReader reader, IJsonWriter jsonW
default:
{
- throw new ODataException(Strings.ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType(reader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType, reader.NodeType));
}
}
@@ -570,7 +571,7 @@ await jsonWriter.EndArrayScopeAsync()
break;
default:
- throw new ODataException(Strings.ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType(reader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType, reader.NodeType));
}
await reader.ReadNextAsync()
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonBatchPayloadItemPropertiesCache.cs b/src/Microsoft.OData.Core/Json/ODataJsonBatchPayloadItemPropertiesCache.cs
index 591e028070..d1c89ecb56 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonBatchPayloadItemPropertiesCache.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonBatchPayloadItemPropertiesCache.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
@@ -215,7 +216,7 @@ private void ScanJsonProperties()
// Throw an ODataException, if a duplicate json property was detected
if (jsonProperties.ContainsKey(propertyName))
{
- throw new ODataException(Strings.ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch, propertyName));
}
switch (propertyName)
@@ -270,7 +271,7 @@ private void ScanJsonProperties()
// Throw an ODataException, if a duplicate header was detected
if (headers.ContainsKeyOrdinal(headerName))
{
- throw new ODataException(Strings.ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch(headerName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch, headerName));
}
// Remember the Content-Type header value.
@@ -304,7 +305,7 @@ private void ScanJsonProperties()
break;
default:
- throw new ODataException(Strings.ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch, propertyName));
}
}
@@ -366,7 +367,7 @@ await this.jsonReader.ReadStartObjectAsync()
// Throw an ODataException, if a duplicate json property was detected
if (jsonProperties.ContainsKey(propertyName))
{
- throw new ODataException(Strings.ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch, propertyName));
}
switch (propertyName)
@@ -422,7 +423,7 @@ await this.jsonReader.ReadStartObjectAsync()
// Throw an ODataException, if a duplicate header was detected
if (headers.ContainsKeyOrdinal(headerName))
{
- throw new ODataException(Strings.ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch(headerName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch, headerName));
}
// Remember the Content-Type header value.
@@ -456,7 +457,7 @@ await bodyContentStream.PopulateCachedBodyContentAsync(contentTypeHeader)
break;
default:
- throw new ODataException(Strings.ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch, propertyName));
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonBatchReader.cs b/src/Microsoft.OData.Core/Json/ODataJsonBatchReader.cs
index 9361ddca74..96d351152f 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonBatchReader.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonBatchReader.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
@@ -358,7 +359,7 @@ protected override void ValidateDependsOnIds(string contentId, IEnumerable dependsOnIds, string atomic
// Self reference to atomicityGroup is not allowed.
if (dependsOnId.Equals(atomicityGroupId, StringComparison.Ordinal))
{
- throw new ODataException(Strings.ODataBatchReader_SameRequestIdAsAtomicityGroupIdNotAllowed(
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_SameRequestIdAsAtomicityGroupIdNotAllowed,
dependsOnId,
atomicityGroupId));
}
@@ -474,7 +475,7 @@ private void ValidateDependsOnId(IEnumerable dependsOnIds, string atomic
// Self reference is not allowed.
if (dependsOnId.Equals(requestId, StringComparison.Ordinal))
{
- throw new ODataException(Strings.ODataBatchReader_SelfReferenceDependsOnRequestIdNotAllowed(
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_SelfReferenceDependsOnRequestIdNotAllowed,
dependsOnId,
requestId));
}
@@ -484,7 +485,7 @@ private void ValidateDependsOnId(IEnumerable dependsOnIds, string atomic
string groupId = this.atomicGroups.GetGroupId(dependsOnId);
if (groupId != null && !groupId.Equals(this.atomicGroups.GetGroupId(requestId), StringComparison.Ordinal))
{
- throw new ODataException(Strings.ODataBatchReader_DependsOnRequestIdIsPartOfAtomicityGroupNotAllowed(
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_DependsOnRequestIdIsPartOfAtomicityGroupNotAllowed,
dependsOnId,
groupId));
}
@@ -510,7 +511,7 @@ private void DetectReaderMode()
}
else
{
- throw new ODataException(Strings.ODataBatchReader_JsonBatchTopLevelPropertyMissing);
+ throw new ODataException(SRResources.ODataBatchReader_JsonBatchTopLevelPropertyMissing);
}
}
@@ -535,7 +536,7 @@ private void HandleNewAtomicGroupStart(string messageId, string groupId)
{
if (this.atomicGroups.IsGroupId(groupId))
{
- throw new ODataException(Strings.ODataBatchReader_DuplicateAtomicityGroupIDsNotAllowed(groupId));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReader_DuplicateAtomicityGroupIDsNotAllowed, groupId));
}
// Add the request Id to the new group.
@@ -635,7 +636,7 @@ await this.batchStream.JsonReader.ReadStartObjectAsync()
}
else
{
- throw new ODataException(Strings.ODataBatchReader_JsonBatchTopLevelPropertyMissing);
+ throw new ODataException(SRResources.ODataBatchReader_JsonBatchTopLevelPropertyMissing);
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonBatchReaderStream.cs b/src/Microsoft.OData.Core/Json/ODataJsonBatchReaderStream.cs
index 52a2fc5eb7..aaceb93767 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonBatchReaderStream.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonBatchReaderStream.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Diagnostics;
@@ -96,7 +97,7 @@ internal override int ReadWithLength(byte[] userBuffer, int userBufferOffset, in
// We cannot fully satisfy the read request since there are not enough bytes in the stream.
// This means that the content length of the stream was incorrect; this should never happen
// since the caller should already have checked this.
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStreamBuffer_ReadWithLength));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStreamBuffer_ReadWithLength));
}
else
{
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonBatchWriter.cs b/src/Microsoft.OData.Core/Json/ODataJsonBatchWriter.cs
index 6a8b11aeba..73592ba4a4 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonBatchWriter.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonBatchWriter.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
@@ -224,7 +225,7 @@ public override void OnInStreamError()
// The OData protocol spec does not define the behavior when an exception is encountered outside of a batch operation. The batch writer
// should not allow WriteError in this case. Note that WCF DS Server does serialize the error in XML format when it encounters one outside of a
// batch operation.
- throw new ODataException(Strings.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
}
public override async Task OnInStreamErrorAsync()
@@ -237,7 +238,7 @@ await this.jsonWriter.FlushAsync()
// The OData protocol spec does not define the behavior when an exception is encountered outside of a batch operation. The batch writer
// should not allow WriteError in this case. Note that WCF DS Server does serialize the error in XML format when it encounters one outside of a
// batch operation.
- throw new ODataException(Strings.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
}
///
@@ -303,7 +304,7 @@ protected override void ValidateDependsOnIds(string contentId, IEnumerable
// already exists. Convert and throw ODataException.
- throw new ODataException(Strings.ODataBatchWriter_DuplicateContentIDsNotAllowed(contentId), ae);
+ throw new ODataException(Error.Format(SRResources.ODataBatchWriter_DuplicateContentIDsNotAllowed, contentId), ae);
}
// Add reverse lookup when current request is part of atomic group.
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonCollectionDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonCollectionDeserializer.cs
index 0353e5a202..b18b2c90f7 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonCollectionDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonCollectionDeserializer.cs
@@ -11,8 +11,8 @@ namespace Microsoft.OData.Json
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.OData.Edm;
+ using Microsoft.OData.Core;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
#endregion Namespaces
///
@@ -89,7 +89,7 @@ internal ODataCollectionStart ReadCollectionStart(
case PropertyParsingResult.ODataInstanceAnnotation:
if (!IsValidODataAnnotationOfCollection(propertyName))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
this.JsonReader.SkipValue();
@@ -100,13 +100,13 @@ internal ODataCollectionStart ReadCollectionStart(
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (!string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
string payloadTypeName = ValidateDataPropertyTypeNameAnnotation(collectionStartPropertyAndAnnotationCollector, propertyName);
@@ -115,12 +115,12 @@ internal ODataCollectionStart ReadCollectionStart(
string itemTypeName = EdmLibraryExtensions.GetCollectionItemTypeName(payloadTypeName);
if (itemTypeName == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_InvalidCollectionTypeName(payloadTypeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_InvalidCollectionTypeName, payloadTypeName));
}
EdmTypeKind targetTypeKind;
ODataTypeAnnotation typeAnnotation;
- Func typeKindFromPayloadFunc = () => { throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart_TypeKindFromPayloadFunc)); };
+ Func typeKindFromPayloadFunc = () => { throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart_TypeKindFromPayloadFunc)); };
actualItemTypeRef = this.ReaderValidator.ResolvePayloadTypeNameAndComputeTargetType(
EdmTypeKind.None,
/*expectStructuredType*/ null,
@@ -144,10 +144,10 @@ internal ODataCollectionStart ReadCollectionStart(
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart));
}
});
@@ -157,14 +157,14 @@ internal ODataCollectionStart ReadCollectionStart(
if (collectionStart == null)
{
// No collection property found; there should be exactly one property in the collection wrapper that does not have a reserved name.
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound, ODataJsonConstants.ODataValuePropertyName));
}
}
// at this point the reader is positioned on the start array node for the collection contents
if (this.JsonReader.NodeType != JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_CannotReadCollectionContentStart(this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_CannotReadCollectionContentStart, this.JsonReader.NodeType));
}
this.JsonReader.AssertNotBuffering();
@@ -255,7 +255,7 @@ internal void ReadCollectionEnd(bool isReadingNestedPayload)
case PropertyParsingResult.ODataInstanceAnnotation:
if (!IsValidODataAnnotationOfCollection(propertyName))
{
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_CannotReadCollectionEnd(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_CannotReadCollectionEnd, propertyName));
}
this.JsonReader.SkipValue();
@@ -264,13 +264,13 @@ internal void ReadCollectionEnd(bool isReadingNestedPayload)
case PropertyParsingResult.PropertyWithoutValue: // fall through
case PropertyParsingResult.PropertyWithValue: // fall through
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_CannotReadCollectionEnd(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_CannotReadCollectionEnd, propertyName));
case PropertyParsingResult.EndOfObject:
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionEnd));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionEnd));
}
});
}
@@ -343,7 +343,7 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.ODataInstanceAnnotation:
if (!IsValidODataAnnotationOfCollection(propertyName))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
await this.JsonReader.SkipValueAsync()
@@ -356,13 +356,13 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (!string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
string payloadTypeName = ValidateDataPropertyTypeNameAnnotation(collectionStartPropertyAndAnnotationCollector, propertyName);
@@ -371,14 +371,14 @@ await this.JsonReader.SkipValueAsync()
string itemTypeName = EdmLibraryExtensions.GetCollectionItemTypeName(payloadTypeName);
if (itemTypeName == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_InvalidCollectionTypeName(payloadTypeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_InvalidCollectionTypeName, payloadTypeName));
}
EdmTypeKind targetTypeKind;
ODataTypeAnnotation typeAnnotation;
Func typeKindFromPayloadFunc = () =>
{
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart_TypeKindFromPayloadFunc));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart_TypeKindFromPayloadFunc));
};
actualItemTypeRef = this.ReaderValidator.ResolvePayloadTypeNameAndComputeTargetType(
@@ -404,11 +404,11 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
default:
throw new ODataException(
- ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart));
+ Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionStart));
}
}).ConfigureAwait(false);
@@ -419,14 +419,14 @@ await this.JsonReader.SkipValueAsync()
{
// No collection property found; there should be exactly one property in the collection wrapper that does not have a reserved name.
throw new ODataException(
- ODataErrorStrings.ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound(ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound, ODataJsonConstants.ODataValuePropertyName));
}
}
// at this point the reader is positioned on the start array node for the collection contents
if (this.JsonReader.NodeType != JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_CannotReadCollectionContentStart(this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_CannotReadCollectionContentStart, this.JsonReader.NodeType));
}
this.JsonReader.AssertNotBuffering();
@@ -526,7 +526,7 @@ await this.JsonReader.SkipValueAsync()
case PropertyParsingResult.ODataInstanceAnnotation:
if (!IsValidODataAnnotationOfCollection(propertyName))
{
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_CannotReadCollectionEnd(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_CannotReadCollectionEnd, propertyName));
}
await this.JsonReader.SkipValueAsync()
@@ -536,14 +536,14 @@ await this.JsonReader.SkipValueAsync()
case PropertyParsingResult.PropertyWithoutValue: // fall through
case PropertyParsingResult.PropertyWithValue: // fall through
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonCollectionDeserializer_CannotReadCollectionEnd(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonCollectionDeserializer_CannotReadCollectionEnd, propertyName));
case PropertyParsingResult.EndOfObject:
break;
default:
throw new ODataException(
- ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionEnd));
+ Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonCollectionDeserializer_ReadCollectionEnd));
}
}).ConfigureAwait(false);
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonContextUriParser.cs b/src/Microsoft.OData.Core/Json/ODataJsonContextUriParser.cs
index a2bff0f6a8..510ddbedd8 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonContextUriParser.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonContextUriParser.cs
@@ -14,7 +14,7 @@ namespace Microsoft.OData.Json
using Microsoft.OData.UriParser;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
@@ -48,7 +48,7 @@ private ODataJsonContextUriParser(IEdmModel model, Uri contextUriFromPayload)
if (!model.IsUserModel())
{
- throw new ODataException(ODataErrorStrings.ODataJsonContextUriParser_NoModel);
+ throw new ODataException(SRResources.ODataJsonContextUriParser_NoModel);
}
this.model = model;
@@ -77,7 +77,7 @@ internal static ODataJsonContextUriParseResult Parse(
{
if (contextUriFromPayload == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonContextUriParser_NullMetadataDocumentUri);
+ throw new ODataException(SRResources.ODataJsonContextUriParser_NullMetadataDocumentUri);
}
// Create a context URI from the payload string.
@@ -86,7 +86,7 @@ internal static ODataJsonContextUriParseResult Parse(
{
if (baseUri == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonContextUriParser_InvalidContextUrl(contextUriFromPayload));
+ throw new ODataException(Error.Format(SRResources.ODataJsonContextUriParser_InvalidContextUrl, contextUriFromPayload));
}
else
{
@@ -97,7 +97,7 @@ internal static ODataJsonContextUriParseResult Parse(
{
if (string.IsNullOrEmpty(navigationSource?.Name))
{
- throw new ODataException(ODataErrorStrings.ODataJsonContextUriParser_InvalidContextUrl(contextUriFromPayload));
+ throw new ODataException(Error.Format(SRResources.ODataJsonContextUriParser_InvalidContextUrl, contextUriFromPayload));
}
else
{
@@ -117,7 +117,7 @@ internal static ODataJsonContextUriParseResult Parse(
if (!Uri.TryCreate(baseUri, contextUriFromPayload, out contextUri))
{
- throw new ODataException(ODataErrorStrings.ODataJsonContextUriParser_InvalidContextUrl(contextUriFromPayload));
+ throw new ODataException(Error.Format(SRResources.ODataJsonContextUriParser_InvalidContextUrl, contextUriFromPayload));
}
}
}
@@ -253,7 +253,7 @@ private void ParseContextUri(ODataPayloadKind expectedPayloadKind, Func ReadAndValidateAnnotationAsLongForIeee754CompatibleAsy
if ((value is string) ^ this.JsonReader.IsIeee754Compatible)
{
- throw new ODataException(Strings.ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter(Metadata.EdmConstants.EdmInt64TypeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter, Metadata.EdmConstants.EdmInt64TypeName));
}
return (long)ODataJsonReaderUtils.ConvertValue(
@@ -767,7 +768,7 @@ internal async Task ReadContextUriAnnotationAsync(
return null;
}
- throw new ODataException(Strings.ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty);
+ throw new ODataException(SRResources.ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty);
}
// Must make sure the input odata.context has a '@' prefix
@@ -782,7 +783,7 @@ internal async Task ReadContextUriAnnotationAsync(
return null;
}
- throw new ODataException(Strings.ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty);
+ throw new ODataException(SRResources.ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty);
}
if (propertyAndAnnotationCollector != null)
@@ -972,7 +973,7 @@ private PropertyParsingResult ParseProperty(
{
if (ODataJsonReaderUtils.IsAnnotationProperty(parsedPropertyName))
{
- throw new ODataException(Strings.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue(lastPropertyAnnotationNameFound, parsedPropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue, lastPropertyAnnotationNameFound, parsedPropertyName));
}
return PropertyParsingResult.PropertyWithoutValue;
@@ -1046,7 +1047,7 @@ private PropertyParsingResult ParseProperty(
{
if (ODataJsonReaderUtils.IsAnnotationProperty(parsedPropertyName))
{
- throw new ODataException(Strings.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue(lastPropertyAnnotationNameFound, parsedPropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue, lastPropertyAnnotationNameFound, parsedPropertyName));
}
return PropertyParsingResult.PropertyWithoutValue;
@@ -1067,7 +1068,7 @@ private void ProcessPropertyAnnotation(string annotatedPropertyName, string anno
// We don't currently support annotation targeting an instance annotation except for the @odata.type property annotation.
if (ODataJsonReaderUtils.IsAnnotationProperty(annotatedPropertyName) && !string.Equals(annotationName, ODataAnnotationNames.ODataType, StringComparison.Ordinal))
{
- throw new ODataException(Strings.ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation(annotationName, annotatedPropertyName, ODataAnnotationNames.ODataType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation, annotationName, annotatedPropertyName, ODataAnnotationNames.ODataType));
}
ReadODataOrCustomInstanceAnnotationValue(annotatedPropertyName, annotationName, propertyAndAnnotationCollector, readPropertyAnnotationValue);
@@ -1287,7 +1288,7 @@ await this.JsonReader.ReadAsync()
{
if (ODataJsonReaderUtils.IsAnnotationProperty(parsedPropertyName))
{
- throw new ODataException(Strings.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue(
+ throw new ODataException(Error.Format(SRResources.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue,
lastPropertyAnnotationNameFound,
parsedPropertyName));
}
@@ -1382,7 +1383,7 @@ await this.ProcessPropertyAnnotationAsync(
if (ODataJsonReaderUtils.IsAnnotationProperty(parsedPropertyName))
{
throw new ODataException(
- Strings.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue(
+ Error.Format(SRResources.ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue,
lastPropertyAnnotationNameFound,
parsedPropertyName));
}
@@ -1412,7 +1413,7 @@ private Task ProcessPropertyAnnotationAsync(
&& !string.Equals(annotationName, ODataAnnotationNames.ODataType, StringComparison.Ordinal))
{
return TaskUtils.GetFaultedTask(
- new ODataException(Strings.ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation(
+ new ODataException(Error.Format(SRResources.ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation,
annotationName,
annotatedPropertyName,
ODataAnnotationNames.ODataType)));
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonEntityReferenceLinkDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonEntityReferenceLinkDeserializer.cs
index 734b9e86b5..e78b07640c 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonEntityReferenceLinkDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonEntityReferenceLinkDeserializer.cs
@@ -11,7 +11,7 @@ namespace Microsoft.OData.Json
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -217,7 +217,7 @@ private void ReadEntityReferenceLinksAnnotations(ODataEntityReferenceLinks links
{
// OData property annotations are not supported on entity reference links.
Func propertyAnnotationValueReader =
- annotationName => { throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks); };
+ annotationName => { throw new ODataException(SRResources.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks); };
bool foundValueProperty = false;
this.ReadPropertyCustomAnnotationValue = this.ReadCustomInstanceAnnotationValue;
@@ -245,7 +245,7 @@ private void ReadEntityReferenceLinksAnnotations(ODataEntityReferenceLinks links
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
break;
@@ -265,7 +265,7 @@ private void ReadEntityReferenceLinksAnnotations(ODataEntityReferenceLinks links
if (!string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
{
// We did not find a supported link collection property; fail.
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
// We found the link collection property and are done parsing property annotations;
@@ -275,16 +275,16 @@ private void ReadEntityReferenceLinksAnnotations(ODataEntityReferenceLinks links
case PropertyParsingResult.PropertyWithoutValue:
// If we find a property without a value it means that we did not find the entity reference links property (yet)
// but an invalid property annotation
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks, propertyName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadEntityReferenceLinksAnnotations));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadEntityReferenceLinksAnnotations));
}
});
@@ -297,7 +297,7 @@ private void ReadEntityReferenceLinksAnnotations(ODataEntityReferenceLinks links
if (forLinksStart)
{
// We did not find the 'value' property.
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound, ODataJsonConstants.ODataValuePropertyName));
}
this.AssertJsonCondition(JsonNodeType.EndObject);
@@ -364,7 +364,7 @@ private ODataEntityReferenceLink ReadSingleEntityReferenceLink(PropertyAndAnnota
if (this.JsonReader.NodeType != JsonNodeType.StartObject)
{
// entity reference link has to be an object
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue(this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue, this.JsonReader.NodeType));
}
this.JsonReader.ReadStartObject();
@@ -376,7 +376,7 @@ private ODataEntityReferenceLink ReadSingleEntityReferenceLink(PropertyAndAnnota
// Entity reference links use instance annotations. Fail if we find a property annotation.
Func propertyAnnotationValueReader =
- annotationName => { throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink(annotationName)); };
+ annotationName => { throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink, annotationName)); };
while (this.JsonReader.NodeType == JsonNodeType.Property)
{
@@ -397,18 +397,18 @@ private ODataEntityReferenceLink ReadSingleEntityReferenceLink(PropertyAndAnnota
case PropertyParsingResult.ODataInstanceAnnotation:
if (!string.Equals(ODataAnnotationNames.ODataId, propertyName, StringComparison.Ordinal))
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink(propertyName, ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink, propertyName, ODataAnnotationNames.ODataId));
}
else if (entityReferenceLink[0] != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink, ODataAnnotationNames.ODataId));
}
// read the value of the 'odata.id' annotation
string urlString = this.JsonReader.ReadStringValue(ODataAnnotationNames.ODataId);
if (urlString == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull, ODataAnnotationNames.ODataId));
}
entityReferenceLink[0] = new ODataEntityReferenceLink
@@ -423,7 +423,7 @@ private ODataEntityReferenceLink ReadSingleEntityReferenceLink(PropertyAndAnnota
case PropertyParsingResult.CustomInstanceAnnotation:
if (entityReferenceLink[0] == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty, ODataAnnotationNames.ODataId));
}
Debug.Assert(!string.IsNullOrEmpty(propertyName), "!string.IsNullOrEmpty(propertyName)");
@@ -439,23 +439,23 @@ private ODataEntityReferenceLink ReadSingleEntityReferenceLink(PropertyAndAnnota
case PropertyParsingResult.PropertyWithValue:
case PropertyParsingResult.PropertyWithoutValue:
// entity reference link is denoted by odata.id annotation
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink, propertyName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadSingleEntityReferenceLink));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadSingleEntityReferenceLink));
}
});
}
if (entityReferenceLink[0] == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty, ODataAnnotationNames.ODataId));
}
// end of the entity reference link object
@@ -555,7 +555,7 @@ private async Task ReadEntityReferenceLinksAnnotationsAsync(
Func> propertyAnnotationValueReaderDelegate =
annotationName =>
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks);
+ throw new ODataException(SRResources.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks);
};
bool foundValueProperty = false;
@@ -592,7 +592,7 @@ await this.JsonReader.ReadAsync()
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
break;
@@ -613,7 +613,7 @@ await this.JsonReader.ReadAsync()
if (!string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
{
// We did not find a supported link collection property; fail.
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
// We found the link collection property and are done parsing property annotations;
@@ -623,16 +623,16 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.PropertyWithoutValue:
// If we find a property without a value it means that we did not find the entity reference links property (yet)
// but an invalid property annotation
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks, propertyName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadEntityReferenceLinksAnnotations));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadEntityReferenceLinksAnnotations));
}
}).ConfigureAwait(false);
@@ -645,7 +645,7 @@ await this.JsonReader.ReadAsync()
if (forLinksStart)
{
// We did not find the 'value' property.
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound, ODataJsonConstants.ODataValuePropertyName));
}
this.AssertJsonCondition(JsonNodeType.EndObject);
@@ -679,7 +679,7 @@ private async Task ReadSingleEntityReferenceLinkAsync(
if (this.JsonReader.NodeType != JsonNodeType.StartObject)
{
// entity reference link has to be an object
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue(this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue, this.JsonReader.NodeType));
}
await this.JsonReader.ReadStartObjectAsync()
@@ -694,7 +694,7 @@ await this.JsonReader.ReadStartObjectAsync()
Func> propertyAnnotationValueReaderDelegate =
annotationName =>
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink, annotationName));
};
while (this.JsonReader.NodeType == JsonNodeType.Property)
@@ -717,11 +717,11 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.ODataInstanceAnnotation:
if (!string.Equals(ODataAnnotationNames.ODataId, propertyName, StringComparison.Ordinal))
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink(propertyName, ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink, propertyName, ODataAnnotationNames.ODataId));
}
else if (entityReferenceLink[0] != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink, ODataAnnotationNames.ODataId));
}
// read the value of the 'odata.id' annotation
@@ -729,7 +729,7 @@ await this.JsonReader.ReadAsync()
.ConfigureAwait(false);
if (urlString == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull, ODataAnnotationNames.ODataId));
}
entityReferenceLink[0] = new ODataEntityReferenceLink
@@ -744,7 +744,7 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.CustomInstanceAnnotation:
if (entityReferenceLink[0] == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty, ODataAnnotationNames.ODataId));
}
Debug.Assert(!string.IsNullOrEmpty(propertyName), "!string.IsNullOrEmpty(propertyName)");
@@ -761,23 +761,23 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.PropertyWithValue:
case PropertyParsingResult.PropertyWithoutValue:
// entity reference link is denoted by odata.id annotation
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink, propertyName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadSingleEntityReferenceLink));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonEntityReferenceLinkDeserializer_ReadSingleEntityReferenceLink));
}
}).ConfigureAwait(false);
}
if (entityReferenceLink[0] == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty(ODataAnnotationNames.ODataId));
+ throw new ODataException(Error.Format(SRResources.ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty, ODataAnnotationNames.ODataId));
}
// end of the entity reference link object
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonErrorDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonErrorDeserializer.cs
index 7a590dfcf9..05f9090aa1 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonErrorDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonErrorDeserializer.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -130,12 +131,12 @@ private ODataError ReadTopLevelErrorImplementation()
if (!string.Equals(ODataJsonConstants.ODataErrorPropertyName, propertyName, StringComparison.Ordinal))
{
// we only allow a single 'error' property for a top-level error object
- throw new ODataException(Strings.ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty, propertyName));
}
if (error != null)
{
- throw new ODataException(Strings.ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName(ODataJsonConstants.ODataErrorPropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName, ODataJsonConstants.ODataErrorPropertyName));
}
error = new ODataError();
@@ -192,12 +193,12 @@ private void ReadJsonObjectInErrorPayload(Action
@@ -412,7 +413,7 @@ private void ReadPropertyValueInODataErrorObject(ODataError error, string proper
{
// we only allow a 'code', 'message', 'target', 'details, and 'innererror' properties
// in the value of the 'error' property or custom instance annotations
- throw new ODataException(Strings.ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty, propertyName));
}
break;
@@ -496,12 +497,12 @@ private async Task ReadTopLevelErrorImplementationAsync()
if (!string.Equals(ODataJsonConstants.ODataErrorPropertyName, propertyName, StringComparison.Ordinal))
{
// We only allow a single 'error' property for a top-level error object
- throw new ODataException(Strings.ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty, propertyName));
}
if (error != null)
{
- throw new ODataException(Strings.ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName(ODataJsonConstants.ODataErrorPropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName, ODataJsonConstants.ODataErrorPropertyName));
}
error = new ODataError();
@@ -565,13 +566,13 @@ await this.JsonReader.ReadAsync()
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(Strings.ODataJsonErrorDeserializer_InstanceAnnotationNotAllowedInErrorPayload(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_InstanceAnnotationNotAllowedInErrorPayload, propertyName));
case PropertyParsingResult.CustomInstanceAnnotation:
await readPropertyWithValueDelegate(propertyName, propertyAndAnnotationCollector)
.ConfigureAwait(false);
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(Strings.ODataJsonErrorDeserializer_PropertyAnnotationWithoutPropertyForError(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_PropertyAnnotationWithoutPropertyForError, propertyName));
case PropertyParsingResult.PropertyWithValue:
await readPropertyWithValueDelegate(propertyName, propertyAndAnnotationCollector)
.ConfigureAwait(false);
@@ -580,7 +581,7 @@ await readPropertyWithValueDelegate(propertyName, propertyAndAnnotationCollector
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(Strings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
}).ConfigureAwait(false);
}
@@ -623,7 +624,7 @@ private async Task ReadErrorPropertyAnnotationValueAsync(string property
if (typeName == null)
{
- throw new ODataException(Strings.ODataJsonPropertyAndValueDeserializer_InvalidTypeName(propertyAnnotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTypeName, propertyAnnotationName));
}
this.AssertJsonCondition(JsonNodeType.Property, JsonNodeType.EndObject);
@@ -632,7 +633,7 @@ private async Task ReadErrorPropertyAnnotationValueAsync(string property
return typeName;
}
- throw new ODataException(Strings.ODataJsonErrorDeserializer_PropertyAnnotationNotAllowedInErrorPayload(propertyAnnotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_PropertyAnnotationNotAllowedInErrorPayload, propertyAnnotationName));
}
///
@@ -814,7 +815,7 @@ private async Task ReadPropertyValueInODataErrorObjectAsync(ODataError error, st
{
// We only allow a 'code', 'message', 'target', 'details, and 'innererror' properties
// in the value of the 'error' property or custom instance annotations
- throw new ODataException(Strings.ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty, propertyName));
}
break;
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonInputContext.cs b/src/Microsoft.OData.Core/Json/ODataJsonInputContext.cs
index 41bfebef63..d2a0ecd324 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonInputContext.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonInputContext.cs
@@ -17,7 +17,7 @@ namespace Microsoft.OData.Json
using System.Text;
using System.Threading.Tasks;
// ReSharper disable RedundantUsingDirective
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
// ReSharper restore RedundantUsingDirective
#endregion Namespaces
@@ -646,7 +646,7 @@ private void VerifyCanCreateParameterReader(IEdmOperation operation)
if (operation == null)
{
- throw new ArgumentNullException(nameof(operation), ODataErrorStrings.ODataJsonInputContext_OperationCannotBeNullForCreateParameterReader("operation"));
+ throw new ArgumentNullException(nameof(operation), Error.Format(SRResources.ODataJsonInputContext_OperationCannotBeNullForCreateParameterReader, "operation"));
}
}
@@ -667,7 +667,7 @@ private void VerifyCanCreateODataReader(IEdmNavigationSource navigationSource, I
// TODO: check for entity only
if (navigationSource == null && (structuredType != null && structuredType.IsODataEntityTypeKind()))
{
- throw new ODataException(ODataErrorStrings.ODataJsonInputContext_NoEntitySetForRequest);
+ throw new ODataException(SRResources.ODataJsonInputContext_NoEntitySetForRequest);
}
}
@@ -676,7 +676,7 @@ private void VerifyCanCreateODataReader(IEdmNavigationSource navigationSource, I
IEdmEntityType entitySetElementType = this.EdmTypeResolver.GetElementType(navigationSource);
if (navigationSource != null && structuredType != null && !structuredType.IsOrInheritsFrom(entitySetElementType))
{
- throw new ODataException(ODataErrorStrings.ODataJsonInputContext_EntityTypeMustBeCompatibleWithEntitySetBaseType(structuredType.FullTypeName(), entitySetElementType.FullName(), navigationSource.FullNavigationSourceName()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonInputContext_EntityTypeMustBeCompatibleWithEntitySetBaseType, structuredType.FullTypeName(), entitySetElementType.FullName(), navigationSource.FullNavigationSourceName()));
}
}
@@ -693,7 +693,7 @@ private void VerifyCanCreateCollectionReader(IEdmTypeReference expectedItemTypeR
if (expectedItemTypeReference == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonInputContext_ItemTypeRequiredForCollectionReaderInRequests);
+ throw new ODataException(SRResources.ODataJsonInputContext_ItemTypeRequiredForCollectionReaderInRequests);
}
}
}
@@ -729,7 +729,7 @@ private void VerifyCanDetectPayloadKind()
{
if (!this.ReadingResponse)
{
- throw new ODataException(ODataErrorStrings.ODataJsonInputContext_PayloadKindDetectionForRequest);
+ throw new ODataException(SRResources.ODataJsonInputContext_PayloadKindDetectionForRequest);
}
}
@@ -740,7 +740,7 @@ private void VerifyUserModel()
{
if (!this.Model.IsUserModel())
{
- throw new ODataException(ODataErrorStrings.ODataJsonInputContext_ModelRequiredForReading);
+ throw new ODataException(SRResources.ODataJsonInputContext_ModelRequiredForReading);
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonOutputContext.cs b/src/Microsoft.OData.Core/Json/ODataJsonOutputContext.cs
index c6a3ef9115..27a7143347 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonOutputContext.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonOutputContext.cs
@@ -14,6 +14,7 @@ namespace Microsoft.OData.Json
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
#endregion Namespaces
@@ -909,7 +910,7 @@ private static IJsonWriter CreateJsonWriter(
if (jsonWriter == null)
{
- throw new ODataException(Strings.ODataMessageWriter_JsonWriterFactory_ReturnedNull(isIeee754Compatible, encoding.WebName));
+ throw new ODataException(Error.Format(SRResources.ODataMessageWriter_JsonWriterFactory_ReturnedNull, isIeee754Compatible, encoding.WebName));
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonParameterDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonParameterDeserializer.cs
index 0989e70e2b..443714feef 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonParameterDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonParameterDeserializer.cs
@@ -11,8 +11,7 @@ namespace Microsoft.OData.Json
using System.Diagnostics;
using System.Threading.Tasks;
using Microsoft.OData.Edm;
- using ODataErrorStrings = Microsoft.OData.Strings;
-
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -23,14 +22,14 @@ internal sealed class ODataJsonParameterDeserializer : ODataJsonPropertyAndValue
/// OData property annotation reader for parameter payloads.
/// OData property annotations are not supported in parameter payloads.
private static readonly Func propertyAnnotationValueReader =
- annotationName => { throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_PropertyAnnotationForParameters); };
+ annotationName => { throw new ODataException(SRResources.ODataJsonParameterDeserializer_PropertyAnnotationForParameters); };
/// OData property annotation asynchronous reader for parameter payloads.
private static readonly Func> propertyAnnotationValueReaderAsync =
annotationName =>
{
// Throw exception since property annotations are not supported in parameter payloads.
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_PropertyAnnotationForParameters);
+ throw new ODataException(SRResources.ODataJsonParameterDeserializer_PropertyAnnotationForParameters);
};
/// The Json parameter reader.
@@ -81,7 +80,7 @@ internal bool ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnota
{
case PropertyParsingResult.ODataInstanceAnnotation:
// OData instance annotations are not supported in parameter payloads.
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(parameterName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, parameterName));
case PropertyParsingResult.CustomInstanceAnnotation:
this.JsonReader.SkipValue();
@@ -89,13 +88,13 @@ internal bool ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnota
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters(parameterName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters, parameterName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(parameterName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, parameterName));
case PropertyParsingResult.PropertyWithValue:
IEdmTypeReference parameterTypeReference = this.parameterReader.GetParameterTypeReference(parameterName);
@@ -110,7 +109,7 @@ internal bool ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnota
IEdmPrimitiveTypeReference primitiveTypeReference = parameterTypeReference.AsPrimitive();
if (primitiveTypeReference.PrimitiveKind() == EdmPrimitiveTypeKind.Stream)
{
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType(parameterName, primitiveTypeReference.PrimitiveKind()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType, parameterName, primitiveTypeReference.PrimitiveKind()));
}
parameterValue = this.ReadNonEntityValue(
@@ -167,7 +166,7 @@ internal bool ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnota
parameterValue = this.JsonReader.ReadPrimitiveValue();
if (parameterValue != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_NullCollectionExpected(JsonNodeType.PrimitiveValue, parameterValue));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_NullCollectionExpected, JsonNodeType.PrimitiveValue, parameterValue));
}
state = ODataParameterReaderState.Value;
@@ -184,7 +183,7 @@ internal bool ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnota
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_UnsupportedParameterTypeKind(parameterName, parameterTypeReference.TypeKind()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_UnsupportedParameterTypeKind, parameterName, parameterTypeReference.TypeKind()));
}
parameterRead = true;
@@ -195,7 +194,7 @@ internal bool ReadNextParameter(PropertyAndAnnotationCollector propertyAndAnnota
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonParameterDeserializer_ReadNextParameter));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonParameterDeserializer_ReadNextParameter));
}
});
@@ -265,7 +264,7 @@ await this.JsonReader.ReadAsync()
{
case PropertyParsingResult.ODataInstanceAnnotation:
// OData instance annotations are not supported in parameter payloads.
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(parameterName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, parameterName));
case PropertyParsingResult.CustomInstanceAnnotation:
await this.JsonReader.SkipValueAsync()
@@ -274,13 +273,13 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters(parameterName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters, parameterName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(parameterName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, parameterName));
case PropertyParsingResult.PropertyWithValue:
IEdmTypeReference parameterTypeReference = this.parameterReader.GetParameterTypeReference(parameterName);
@@ -297,7 +296,7 @@ await this.JsonReader.SkipValueAsync()
if (primitiveTypeReference.PrimitiveKind() == EdmPrimitiveTypeKind.Stream)
{
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType(parameterName, primitiveTypeReference.PrimitiveKind()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType, parameterName, primitiveTypeReference.PrimitiveKind()));
}
parameterValue = await this.ReadNonEntityValueAsync(
@@ -355,7 +354,7 @@ await this.JsonReader.SkipValueAsync()
.ConfigureAwait(false);
if (parameterValue != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_NullCollectionExpected(JsonNodeType.PrimitiveValue, parameterValue));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_NullCollectionExpected, JsonNodeType.PrimitiveValue, parameterValue));
}
state = ODataParameterReaderState.Value;
@@ -372,7 +371,7 @@ await this.JsonReader.SkipValueAsync()
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonParameterDeserializer_UnsupportedParameterTypeKind(parameterName, parameterTypeReference.TypeKind()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonParameterDeserializer_UnsupportedParameterTypeKind, parameterName, parameterTypeReference.TypeKind()));
}
parameterRead = true;
@@ -383,7 +382,7 @@ await this.JsonReader.SkipValueAsync()
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonParameterDeserializer_ReadNextParameter));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonParameterDeserializer_ReadNextParameter));
}
}).ConfigureAwait(false);
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonPropertyAndValueDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonPropertyAndValueDeserializer.cs
index ea25dfde78..fe375f574b 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonPropertyAndValueDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonPropertyAndValueDeserializer.cs
@@ -15,7 +15,7 @@ namespace Microsoft.OData.Json
using System.Threading.Tasks;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -279,7 +279,7 @@ internal static IEdmTypeReference ResolveUntypedType(
TypeUtils.ParseQualifiedTypeName(payloadTypeName, out namespaceName, out name, out isCollection);
if (isCollection)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected(payloadTypeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected, payloadTypeName));
}
typeReference = new EdmTypeDefinition(namespaceName, name, typeReference.PrimitiveKind()).ToTypeReference(/*isNullable*/ true);
@@ -293,7 +293,7 @@ internal static IEdmTypeReference ResolveUntypedType(
TypeUtils.ParseQualifiedTypeName(payloadTypeName, out namespaceName, out name, out isCollection);
if (isCollection)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected(payloadTypeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected, payloadTypeName));
}
return new EdmUntypedStructuredType(namespaceName, name).ToTypeReference(/*isNullable*/ true);
@@ -307,7 +307,7 @@ internal static IEdmTypeReference ResolveUntypedType(
TypeUtils.ParseQualifiedTypeName(payloadTypeName, out namespaceName, out name, out isCollection);
if (!isCollection)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_CollectionTypeExpected(payloadTypeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_CollectionTypeExpected, payloadTypeName));
}
return new EdmCollectionType(new EdmUntypedStructuredType(namespaceName, name).ToTypeReference(/*isNullable*/ true)).ToTypeReference(/*isNullable*/true);
@@ -582,7 +582,7 @@ protected static void ValidateExpandedNestedResourceInfoPropertyValue(
{
if (isCollection == false)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadSingletonNestedResource(nodeType, propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadSingletonNestedResource, nodeType, propertyName));
}
}
else if ((nodeType == JsonNodeType.PrimitiveValue && jsonReader.GetValue() == null) || nodeType == JsonNodeType.StartObject)
@@ -597,7 +597,7 @@ protected static void ValidateExpandedNestedResourceInfoPropertyValue(
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadCollectionNestedResource(nodeType, propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadCollectionNestedResource, nodeType, propertyName));
}
}
@@ -605,7 +605,7 @@ protected static void ValidateExpandedNestedResourceInfoPropertyValue(
else
{
Debug.Assert(nodeType == JsonNodeType.PrimitiveValue, "nodeType == JsonNodeType.PrimitiveValue");
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadNestedResource(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadNestedResource, propertyName));
}
}
@@ -663,7 +663,7 @@ protected static ODataJsonReaderNestedResourceInfo ReadNonExpandedResourceNested
// Check the odata.type annotation for the complex property, it should show inside the complex object.
if (ValidateDataPropertyTypeNameAnnotation(resourceState.PropertyAndAnnotationCollector, nestedResourceInfo.Name) != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ComplexValueWithPropertyTypeAnnotation(ODataAnnotationNames.ODataType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ComplexValueWithPropertyTypeAnnotation, ODataAnnotationNames.ODataType));
}
return ODataJsonReaderNestedResourceInfo.CreateResourceReaderNestedResourceInfo(nestedResourceInfo, complexProperty, nestedResourceType);
@@ -720,7 +720,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
default:
if (messageReaderSettings.ThrowOnUndeclaredPropertyForNonOpenType)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedExpandedSingletonNavigationLinkPropertyAnnotation(nestedResourceInfo.Name, propertyAnnotation.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedExpandedSingletonNavigationLinkPropertyAnnotation, nestedResourceInfo.Name, propertyAnnotation.Key));
}
break;
@@ -800,7 +800,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
case ODataAnnotationNames.ODataDeltaLink: // Delta links are not supported on expanded resource sets.
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedExpandedCollectionNavigationLinkPropertyAnnotation(nestedResourceInfo.Name, propertyAnnotation.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedExpandedCollectionNavigationLinkPropertyAnnotation, nestedResourceInfo.Name, propertyAnnotation.Key));
}
}
@@ -873,12 +873,12 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
LinkedList entityReferenceLinksList = propertyAnnotation.Value as LinkedList;
if (entityReferenceLinksList != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ArrayValueForSingletonBindPropertyAnnotation(nestedResourceInfo.Name, ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_ArrayValueForSingletonBindPropertyAnnotation, nestedResourceInfo.Name, ODataAnnotationNames.ODataBind));
}
if (isExpanded)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_SingletonNavigationPropertyWithBindingAndValue(nestedResourceInfo.Name, ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_SingletonNavigationPropertyWithBindingAndValue, nestedResourceInfo.Name, ODataAnnotationNames.ODataBind));
}
Debug.Assert(
@@ -888,7 +888,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation(
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation,
nestedResourceInfo.Name,
propertyAnnotation.Key,
ODataAnnotationNames.ODataBind));
@@ -934,7 +934,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
ODataEntityReferenceLink entityReferenceLink = propertyAnnotation.Value as ODataEntityReferenceLink;
if (entityReferenceLink != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_StringValueForCollectionBindPropertyAnnotation(nestedResourceInfo.Name, ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_StringValueForCollectionBindPropertyAnnotation, nestedResourceInfo.Name, ODataAnnotationNames.ODataBind));
}
Debug.Assert(
@@ -944,7 +944,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation(
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation,
nestedResourceInfo.Name,
propertyAnnotation.Key,
ODataAnnotationNames.ODataBind));
@@ -1130,7 +1130,7 @@ protected string ReadODataTypeAnnotationValue()
string typeName = ReaderUtils.AddEdmPrefixOfTypeName(ReaderUtils.RemovePrefixOfTypeName(this.JsonReader.ReadStringValue()));
if (typeName == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTypeName(typeName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTypeName, typeName));
}
this.AssertJsonCondition(JsonNodeType.Property, JsonNodeType.EndObject);
@@ -1155,7 +1155,7 @@ protected object ReadTypePropertyAnnotationValue(string propertyAnnotationName)
return typeName;
}
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyAnnotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyAnnotationName));
}
///
@@ -1219,7 +1219,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(prop
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedComplexCollectionPropertyAnnotation(propertyName, propertyAnnotation.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedComplexCollectionPropertyAnnotation, propertyName, propertyAnnotation.Key));
}
}
@@ -1323,7 +1323,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
bool isReordering = this.JsonReader is ReorderingJsonReader;
Func propertyAnnotationReaderForTopLevelProperty =
- annotationName => { throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation(annotationName)); };
+ annotationName => { throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation, annotationName)); };
// Read through all top-level properties, ignore the ones with reserved names (i.e., reserved
// characters in their name) and throw if we find none or more than one properties without reserved name.
@@ -1357,7 +1357,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
if (!object.ReferenceEquals(missingPropertyValue, propertyValue))
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty(ODataAnnotationNames.ODataType, ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty, ODataAnnotationNames.ODataType, ODataJsonConstants.ODataValuePropertyName));
}
payloadTypeName = this.ReadODataTypeAnnotationValue();
@@ -1365,7 +1365,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
break;
@@ -1379,7 +1379,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
@@ -1398,7 +1398,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
else
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
break;
@@ -1407,7 +1407,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
});
}
@@ -1415,7 +1415,7 @@ private ODataProperty ReadTopLevelPropertyImplementation(IEdmTypeReference expec
if (object.ReferenceEquals(missingPropertyValue, propertyValue))
{
// No property found; there should be exactly one property in the top-level property wrapper that does not have a reserved name.
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload);
}
}
}
@@ -1450,7 +1450,7 @@ private IEdmTypeReference UpdateExpectedTypeBasedOnContextUri(IEdmTypeReference
IEdmType typeFromContextUri = this.ContextUriParseResult.EdmType;
if (expectedPropertyTypeReference != null && !expectedPropertyTypeReference.Definition.IsAssignableFrom(typeFromContextUri))
{
- throw new ODataException(ODataErrorStrings.ReaderValidationUtils_TypeInContextUriDoesNotMatchExpectedType(
+ throw new ODataException(Error.Format(SRResources.ReaderValidationUtils_TypeInContextUriDoesNotMatchExpectedType,
UriUtils.UriToString(this.ContextUriParseResult.ContextUri),
typeFromContextUri.FullTypeName(),
expectedPropertyTypeReference.FullName()));
@@ -1561,7 +1561,7 @@ private object ReadTypeDefinitionValue(bool insideJsonObjectValue, IEdmTypeDefin
}
catch (OverflowException)
{
- throw new ODataException(ODataErrorStrings.EdmLibraryExtensions_ValueOverflowForUnderlyingType(result, expectedValueTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.EdmLibraryExtensions_ValueOverflowForUnderlyingType, result, expectedValueTypeReference.FullName()));
}
}
@@ -1601,7 +1601,7 @@ private object ReadPrimitiveValue(bool insideJsonObjectValue, IEdmPrimitiveTypeR
{
// We manually throw JSON exception here to get a nicer error message (we expect primitive value and got object).
// Otherwise the ReadPrimitiveValue would fail with something like "expected primitive value but found property/end object" which is rather confusing.
- throw new ODataException(ODataErrorStrings.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName(JsonNodeType.PrimitiveValue, JsonNodeType.StartObject, propertyName));
+ throw new ODataException(Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName, JsonNodeType.PrimitiveValue, JsonNodeType.StartObject, propertyName));
}
result = this.JsonReader.ReadPrimitiveValue();
@@ -1613,7 +1613,7 @@ private object ReadPrimitiveValue(bool insideJsonObjectValue, IEdmPrimitiveTypeR
{
if ((result is string) ^ this.JsonReader.IsIeee754Compatible)
{
- throw new ODataException(ODataErrorStrings.ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter(expectedValueTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter, expectedValueTypeReference.FullName()));
}
}
@@ -1654,7 +1654,7 @@ private object ReadEnumValue(bool insideJsonObjectValue, IEdmEnumTypeReference e
{
// We manually throw JSON exception here to get a nicer error message (we expect primitive value and got object).
// Otherwise the ReadPrimitiveValue would fail with something like "expected primitive value but found property/end object" which is rather confusing.
- throw new ODataException(ODataErrorStrings.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName(JsonNodeType.PrimitiveValue, JsonNodeType.StartObject, propertyName));
+ throw new ODataException(Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName, JsonNodeType.PrimitiveValue, JsonNodeType.StartObject, propertyName));
}
string enumStr = this.JsonReader.ReadStringValue();
@@ -1686,7 +1686,7 @@ private ODataResourceValue ReadResourceValue(
{
string typeName = structuredTypeReference != null ? structuredTypeReference.FullName() : payloadTypeName;
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty(propertyName, this.JsonReader.NodeType, typeName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty, propertyName, this.JsonReader.NodeType, typeName));
}
this.JsonReader.Read();
@@ -1745,11 +1745,11 @@ private ODataResourceValue ReadResourceValue(
case PropertyParsingResult.ODataInstanceAnnotation: // odata.*
if (string.Equals(ODataAnnotationNames.ODataType, propertyName, StringComparison.Ordinal))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst);
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
case PropertyParsingResult.CustomInstanceAnnotation: // custom instance annotation
@@ -1762,7 +1762,7 @@ private ODataResourceValue ReadResourceValue(
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
// Any other property is data
@@ -1811,7 +1811,7 @@ private ODataResourceValue ReadResourceValue(
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
});
}
@@ -1938,7 +1938,7 @@ private object ReadNonEntityValueImplementation(
if (targetTypeKind != EdmTypeKind.Collection || isDynamicProperty != true)
{
// A null value was found for the property named '{0}', which has the expected type '{1}[Nullable=False]'. The expected type '{1}[Nullable=False]' does not allow null values.
- throw new ODataException(ODataErrorStrings.ReaderValidationUtils_NullNamedValueForNonNullableType(propertyName, targetTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.ReaderValidationUtils_NullNamedValueForNonNullableType, propertyName, targetTypeReference.FullName()));
}
}
@@ -1959,7 +1959,7 @@ private object ReadNonEntityValueImplementation(
// for primitive values are property annotations, not instance annotations inside the value.
if (typeNameFoundInPayload)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue(ODataAnnotationNames.ODataType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue, ODataAnnotationNames.ODataType));
}
result = this.ReadPrimitiveValue(
@@ -1998,7 +1998,7 @@ private object ReadNonEntityValueImplementation(
{
// We manually throw JSON exception here to get a nicer error message (we expect array value and got object).
// Otherwise the ReadCollectionValue would fail with something like "expected array value but found property/end object" which is rather confusing.
- throw new ODataException(ODataErrorStrings.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName(JsonNodeType.StartArray, JsonNodeType.StartObject, propertyName));
+ throw new ODataException(Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName, JsonNodeType.StartArray, JsonNodeType.StartObject, propertyName));
}
result = this.ReadCollectionValue(
@@ -2020,7 +2020,7 @@ private object ReadNonEntityValueImplementation(
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonPropertyAndValueDeserializer_ReadPropertyValue));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonPropertyAndValueDeserializer_ReadPropertyValue));
}
// If we have no expected type make sure the collection items are of the same kind and specify the same name.
@@ -2149,7 +2149,7 @@ private bool IsTopLevel6xNullValue()
object nullAnnotationValue = this.JsonReader.ReadPrimitiveValue();
if (!(nullAnnotationValue is bool) || (bool)nullAnnotationValue == false)
{
- throw new ODataException(ODataErrorStrings.ODataJsonReaderUtils_InvalidValueForODataNullAnnotation(ODataAnnotationNames.ODataNull, ODataJsonConstants.ODataNullAnnotationTrueValue));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_InvalidValueForODataNullAnnotation, ODataAnnotationNames.ODataNull, ODataJsonConstants.ODataNullAnnotationTrueValue));
}
}
@@ -2165,7 +2165,7 @@ private void ValidateNoPropertyInNullPayload(PropertyAndAnnotationCollector prop
Debug.Assert(propertyAndAnnotationCollector != null, "propertyAndAnnotationCollector != null");
// we use the ParseProperty method to ignore custom annotations.
- Func propertyAnnotationReaderForTopLevelNull = annotationName => { throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation(annotationName)); };
+ Func propertyAnnotationReaderForTopLevelNull = annotationName => { throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation, annotationName)); };
while (this.JsonReader.NodeType == JsonNodeType.Property)
{
this.ProcessProperty(
@@ -2182,23 +2182,23 @@ private void ValidateNoPropertyInNullPayload(PropertyAndAnnotationCollector prop
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
case PropertyParsingResult.CustomInstanceAnnotation:
this.JsonReader.SkipValue();
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload, propertyName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
});
}
@@ -2380,7 +2380,7 @@ protected static async Task ValidateExpandedNestedResourceInfoPropertyValueAsync
{
if (isCollection == false)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadSingletonNestedResource(nodeType, propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadSingletonNestedResource, nodeType, propertyName));
}
}
else if (
@@ -2401,7 +2401,7 @@ protected static async Task ValidateExpandedNestedResourceInfoPropertyValueAsync
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadCollectionNestedResource(nodeType, propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadCollectionNestedResource, nodeType, propertyName));
}
}
@@ -2409,7 +2409,7 @@ protected static async Task ValidateExpandedNestedResourceInfoPropertyValueAsync
else
{
Debug.Assert(nodeType == JsonNodeType.PrimitiveValue, "nodeType == JsonNodeType.PrimitiveValue");
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadNestedResource(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadNestedResource, propertyName));
}
}
@@ -2436,7 +2436,8 @@ protected async Task ReadODataTypeAnnotationValueAsync()
await this.JsonReader.ReadStringValueAsync().ConfigureAwait(false)));
if (typeName == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTypeName(typeName));
+ // TODO: It's meaningless to output an error message using "typeName == null". Should use the original JSON value to construct the error message.
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTypeName, typeName));
}
this.AssertJsonCondition(JsonNodeType.Property, JsonNodeType.EndObject);
@@ -2499,7 +2500,7 @@ protected async Task ReadTypePropertyAnnotationValueAsync(string propert
return typeName;
}
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyAnnotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyAnnotationName));
}
///
@@ -2618,7 +2619,7 @@ await this.ValidateNoPropertyInNullPayloadAsync(propertyAndAnnotationCollector)
Func> readTopLevelPropertyAnnotationValueDelegate =
(annotationName) =>
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation, annotationName));
};
// Read through all top-level properties, ignore the ones with reserved names (i.e., reserved
@@ -2655,7 +2656,7 @@ await this.JsonReader.SkipValueAsync()
if (!object.ReferenceEquals(missingPropertyValue, propertyValue))
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty(ODataAnnotationNames.ODataType, ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty, ODataAnnotationNames.ODataType, ODataJsonConstants.ODataValuePropertyName));
}
payloadTypeName = await this.ReadODataTypeAnnotationValueAsync()
@@ -2664,7 +2665,7 @@ await this.JsonReader.SkipValueAsync()
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
break;
@@ -2680,7 +2681,7 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
@@ -2699,7 +2700,7 @@ await this.JsonReader.SkipValueAsync()
else
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
break;
@@ -2708,7 +2709,7 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
}).ConfigureAwait(false);
}
@@ -2716,7 +2717,7 @@ await this.JsonReader.SkipValueAsync()
if (object.ReferenceEquals(missingPropertyValue, propertyValue))
{
// No property found; there should be exactly one property in the top-level property wrapper that does not have a reserved name.
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload);
}
}
}
@@ -2847,7 +2848,7 @@ private async Task ReadTypeDefinitionValueAsync(
}
catch (OverflowException)
{
- throw new ODataException(ODataErrorStrings.EdmLibraryExtensions_ValueOverflowForUnderlyingType(result, expectedValueTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.EdmLibraryExtensions_ValueOverflowForUnderlyingType, result, expectedValueTypeReference.FullName()));
}
}
@@ -2897,7 +2898,7 @@ private async Task ReadPrimitiveValueAsync(
// Otherwise the ReadPrimitiveValueAsync would fail with something like
// "expected primitive value but found property/end object" which is rather confusing.
throw new ODataException(
- ODataErrorStrings.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName(
+ Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName,
JsonNodeType.PrimitiveValue,
JsonNodeType.StartObject,
propertyName));
@@ -2913,7 +2914,7 @@ private async Task ReadPrimitiveValueAsync(
{
if ((result is string) ^ this.JsonReader.IsIeee754Compatible)
{
- throw new ODataException(ODataErrorStrings.ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter(expectedValueTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter, expectedValueTypeReference.FullName()));
}
}
@@ -2964,7 +2965,7 @@ private async Task ReadEnumValueAsync(
// Otherwise the ReadPrimitiveValue would fail with something like
// "expected primitive value but found property/end object" which is rather confusing.
throw new ODataException(
- ODataErrorStrings.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName(
+ Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName,
JsonNodeType.PrimitiveValue,
JsonNodeType.StartObject,
propertyName));
@@ -3004,7 +3005,7 @@ private async Task ReadResourceValueAsync(
{
string typeName = structuredTypeReference != null ? structuredTypeReference.FullName() : payloadTypeName;
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty(propertyName, this.JsonReader.NodeType, typeName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty, propertyName, this.JsonReader.NodeType, typeName));
}
await this.JsonReader.ReadAsync()
@@ -3069,11 +3070,11 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.ODataInstanceAnnotation: // odata.*
if (string.Equals(ODataAnnotationNames.ODataType, propertyName, StringComparison.Ordinal))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst);
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
}
case PropertyParsingResult.CustomInstanceAnnotation: // custom instance annotation
@@ -3089,7 +3090,7 @@ await this.JsonReader.ReadAsync()
case PropertyParsingResult.PropertyWithoutValue:
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty(propertyName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
// Any other property is data
@@ -3139,7 +3140,7 @@ await this.JsonReader.ReadAsync()
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
}).ConfigureAwait(false);
}
@@ -3277,7 +3278,7 @@ await this.JsonReader.GetValueAsync().ConfigureAwait(false),
if (targetTypeKind != EdmTypeKind.Collection || isDynamicProperty != true)
{
// A null value was found for the property named '{0}', which has the expected type '{1}[Nullable=False]'. The expected type '{1}[Nullable=False]' does not allow null values.
- throw new ODataException(ODataErrorStrings.ReaderValidationUtils_NullNamedValueForNonNullableType(propertyName, targetTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.ReaderValidationUtils_NullNamedValueForNonNullableType, propertyName, targetTypeReference.FullName()));
}
}
@@ -3298,7 +3299,7 @@ await this.JsonReader.GetValueAsync().ConfigureAwait(false),
// for primitive values are property annotations, not instance annotations inside the value.
if (typeNameFoundInPayload)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue(ODataAnnotationNames.ODataType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue, ODataAnnotationNames.ODataType));
}
result = await this.ReadPrimitiveValueAsync(
@@ -3341,7 +3342,7 @@ await this.JsonReader.GetValueAsync().ConfigureAwait(false),
// Otherwise the ReadCollectionValue would fail with something like
// "expected array value but found property/end object" which is rather confusing.
throw new ODataException(
- ODataErrorStrings.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName(
+ Error.Format(SRResources.JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName,
JsonNodeType.StartArray,
JsonNodeType.StartObject,
propertyName));
@@ -3367,7 +3368,7 @@ await this.JsonReader.GetValueAsync().ConfigureAwait(false),
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonPropertyAndValueDeserializer_ReadPropertyValue));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonPropertyAndValueDeserializer_ReadPropertyValue));
}
// If we have no expected type make sure the collection items are of the same kind and specify the same name.
@@ -3530,7 +3531,7 @@ await this.JsonReader.ReadNextAsync()
if (!(nullAnnotationValue is bool) || (bool)nullAnnotationValue == false)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonReaderUtils_InvalidValueForODataNullAnnotation(
+ Error.Format(SRResources.ODataJsonReaderUtils_InvalidValueForODataNullAnnotation,
ODataAnnotationNames.ODataNull,
ODataJsonConstants.ODataNullAnnotationTrueValue));
}
@@ -3552,7 +3553,7 @@ private async Task ValidateNoPropertyInNullPayloadAsync(PropertyAndAnnotationCol
Func> readTopLevelPropertyAnnotationValueDelegate =
(annotationName) =>
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation, annotationName));
};
while (this.JsonReader.NodeType == JsonNodeType.Property)
@@ -3572,7 +3573,7 @@ await this.JsonReader.ReadAsync()
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyName));
case PropertyParsingResult.CustomInstanceAnnotation:
await this.JsonReader.SkipValueAsync()
@@ -3580,16 +3581,16 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload, propertyName));
case PropertyParsingResult.EndOfObject:
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
}).ConfigureAwait(false);
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonPropertySerializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonPropertySerializer.cs
index f70f31f638..71c34dab4e 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonPropertySerializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonPropertySerializer.cs
@@ -13,6 +13,7 @@ namespace Microsoft.OData.Json
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading.Tasks;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Evaluation;
#endregion Namespaces
@@ -195,7 +196,7 @@ internal void WriteProperty(
{
if (isTopLevel)
{
- throw new ODataException(Strings.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue(property.Name));
+ throw new ODataException(Error.Format(SRResources.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue, property.Name));
}
this.WriteResourceProperty(property, resourceValue, isOpenPropertyType);
@@ -209,7 +210,7 @@ internal void WriteProperty(
{
if (collectionValue.Items != null && collectionValue.Items.Any(i => i is ODataResourceValue))
{
- throw new ODataException(Strings.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue(property.Name));
+ throw new ODataException(Error.Format(SRResources.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue, property.Name));
}
}
@@ -416,7 +417,7 @@ await this.WriteEnumPropertyAsync(enumValue, isOpenPropertyType)
{
if (isTopLevel)
{
- throw new ODataException(Strings.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue(property.Name));
+ throw new ODataException(Error.Format(SRResources.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue, property.Name));
}
await this.WriteResourcePropertyAsync(property, resourceValue, isOpenPropertyType)
@@ -431,7 +432,7 @@ await this.WriteResourcePropertyAsync(property, resourceValue, isOpenPropertyTyp
{
if (collectionValue.Items != null && collectionValue.Items.Any(i => i is ODataResourceValue))
{
- throw new ODataException(Strings.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue(property.Name));
+ throw new ODataException(Error.Format(SRResources.ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue, property.Name));
}
}
@@ -662,7 +663,7 @@ private void WriteNullProperty(
// ...
// If the property is single-valued and has the null value, the service responds with 204 No Content.
// ...
- throw new ODataException(Strings.ODataMessageWriter_CannotWriteTopLevelNull);
+ throw new ODataException(SRResources.ODataMessageWriter_CannotWriteTopLevelNull);
}
}
else
@@ -1100,7 +1101,7 @@ await this.JsonWriter.WriteValueAsync(true)
// ...
// If the property is single-valued and has the null value, the service responds with 204 No Content.
// ...
- throw new ODataException(Strings.ODataMessageWriter_CannotWriteTopLevelNull);
+ throw new ODataException(SRResources.ODataMessageWriter_CannotWriteTopLevelNull);
}
}
else
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonReader.cs b/src/Microsoft.OData.Core/Json/ODataJsonReader.cs
index 570ab11e3c..0373c9ec28 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonReader.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonReader.cs
@@ -17,7 +17,7 @@ namespace Microsoft.OData.Json
using Microsoft.OData.Evaluation;
using Microsoft.OData.Metadata;
using Microsoft.OData.UriParser;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
@@ -1738,7 +1738,7 @@ private void ReadResourceSetStart(ODataResourceSet resourceSet, SelectedProperti
&& jsonReader.NodeType != JsonNodeType.PrimitiveValue
&& jsonReader.NodeType != JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet(jsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet, jsonReader.NodeType));
}
this.EnterScope(new JsonResourceSetScope(resourceSet, this.CurrentNavigationSource,
@@ -1812,7 +1812,7 @@ private void ReadExpandedNestedResourceInfoStart(ODataNestedResourceInfo nestedR
if (nullValueReadBehaviorKind == ODataNullValueBehaviorKind.Default)
{
throw new ODataException(
- Strings.ReaderValidationUtils_NullNamedValueForNonNullableType(nestedResourceInfo.Name,
+ Error.Format(SRResources.ReaderValidationUtils_NullNamedValueForNonNullableType, nestedResourceInfo.Name,
structuralProperty.Type.FullName()));
}
}
@@ -1896,7 +1896,7 @@ private void ReadResourceSetItemStart(PropertyAndAnnotationCollector propertyAnd
}
else
{
- throw new ODataException(Strings.ODataJsonReader_UnexpectedPrimitiveValueForODataResource);
+ throw new ODataException(SRResources.ODataJsonReader_UnexpectedPrimitiveValueForODataResource);
}
}
else
@@ -2056,7 +2056,7 @@ private void ReadDeltaResourceSetStart(ODataDeltaResourceSet deltaResourceSet, S
IJsonReader jsonReader = this.jsonResourceDeserializer.JsonReader;
if (jsonReader.NodeType != JsonNodeType.EndArray && jsonReader.NodeType != JsonNodeType.StartObject)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet(jsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet, jsonReader.NodeType));
}
Debug.Assert(this.CurrentResourceType is IEdmEntityType, "Delta resource type is not an entity");
@@ -2144,7 +2144,7 @@ private void ReadNextResourceSetItem()
if (resourceType?.TypeKind == EdmTypeKind.Entity && !resourceType.IsOpen())
{
throw new ODataException(
- ODataErrorStrings.ODataJsonReader_CannotReadResourcesOfResourceSet(
+ Error.Format(SRResources.ODataJsonReader_CannotReadResourcesOfResourceSet,
this.jsonResourceDeserializer.JsonReader.NodeType));
}
@@ -2178,7 +2178,7 @@ private void ReadNextResourceSetItem()
break;
default:
throw new ODataException(
- ODataErrorStrings.ODataJsonReader_CannotReadResourcesOfResourceSet(
+ Error.Format(SRResources.ODataJsonReader_CannotReadResourcesOfResourceSet,
this.jsonResourceDeserializer.JsonReader.NodeType));
}
}
@@ -3257,7 +3257,7 @@ await this.jsonResourceDeserializer.ReadResourceSetContentStartAsync()
&& jsonReader.NodeType != JsonNodeType.PrimitiveValue
&& jsonReader.NodeType != JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet(jsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet, jsonReader.NodeType));
}
this.EnterScope(new JsonResourceSetScope(
@@ -3338,7 +3338,7 @@ await this.jsonResourceDeserializer.JsonReader.GetValueAsync().ConfigureAwait(fa
if (nullValueReadBehaviorKind == ODataNullValueBehaviorKind.Default)
{
- throw new ODataException(Strings.ReaderValidationUtils_NullNamedValueForNonNullableType(
+ throw new ODataException(Error.Format(SRResources.ReaderValidationUtils_NullNamedValueForNonNullableType,
nestedResourceInfo.Name,
structuralProperty.Type.FullName()));
}
@@ -3417,7 +3417,7 @@ private async Task ReadResourceSetItemStartAsync(PropertyAndAnnotationCollector
}
else
{
- throw new ODataException(Strings.ODataJsonReader_UnexpectedPrimitiveValueForODataResource);
+ throw new ODataException(SRResources.ODataJsonReader_UnexpectedPrimitiveValueForODataResource);
}
}
else
@@ -3612,7 +3612,7 @@ await this.ReadResourceSetEndAsync()
case JsonNodeType.PrimitiveValue:
if (resourceType?.TypeKind == EdmTypeKind.Entity && !resourceType.IsOpen())
{
- throw new ODataException(ODataErrorStrings.ODataJsonReader_CannotReadResourcesOfResourceSet(
+ throw new ODataException(Error.Format(SRResources.ODataJsonReader_CannotReadResourcesOfResourceSet,
this.jsonResourceDeserializer.JsonReader.NodeType));
}
@@ -3654,7 +3654,7 @@ await this.ReadResourceSetItemStartAsync(
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonReader_CannotReadResourcesOfResourceSet(
+ throw new ODataException(Error.Format(SRResources.ODataJsonReader_CannotReadResourcesOfResourceSet,
this.jsonResourceDeserializer.JsonReader.NodeType));
}
}
@@ -3678,7 +3678,7 @@ await this.jsonResourceDeserializer.ReadResourceSetContentStartAsync()
IJsonReader jsonReader = this.jsonResourceDeserializer.JsonReader;
if (jsonReader.NodeType != JsonNodeType.EndArray && jsonReader.NodeType != JsonNodeType.StartObject)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet(jsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet, jsonReader.NodeType));
}
Debug.Assert(this.CurrentResourceType is IEdmEntityType, "Delta resource type is not an entity");
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonReaderCoreUtils.cs b/src/Microsoft.OData.Core/Json/ODataJsonReaderCoreUtils.cs
index ab25fa2e3f..e1b6c23f6f 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonReaderCoreUtils.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonReaderCoreUtils.cs
@@ -12,7 +12,7 @@ namespace Microsoft.OData.Json
using System.Diagnostics;
using Microsoft.Spatial;
using Microsoft.OData.Edm;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
using System.Threading.Tasks;
#endregion Namespaces
@@ -73,7 +73,7 @@ internal static ISpatial ReadSpatialValue(
if (spatialValue == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue);
+ throw new ODataException(SRResources.ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue);
}
return spatialValue;
@@ -174,7 +174,7 @@ internal static async Task ReadSpatialValueAsync(
if (spatialValue == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue);
+ throw new ODataException(SRResources.ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue);
}
return spatialValue;
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonReaderUtils.cs b/src/Microsoft.OData.Core/Json/ODataJsonReaderUtils.cs
index a6749e9ddb..8cf216c719 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonReaderUtils.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonReaderUtils.cs
@@ -11,8 +11,7 @@ namespace Microsoft.OData.Json
using System.Diagnostics;
using Microsoft.OData.Metadata;
using Microsoft.OData.Edm;
- using ODataErrorStrings = Microsoft.OData.Strings;
- using ODataPlatformHelper = Microsoft.OData.PlatformHelper;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -176,7 +175,7 @@ internal static void ValidateAnnotationValue(object propertyValue, string annota
if (propertyValue == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonReaderUtils_AnnotationWithNullValue(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonReaderUtils_AnnotationWithNullValue, annotationName));
}
}
@@ -227,7 +226,7 @@ internal static string GetPayloadTypeName(object payloadItem)
return resource.TypeName;
}
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonReader_ReadResourceStart));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonReader_ReadResourceStart));
}
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs
index 5342885a9f..c6eaace36a 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonResourceDeserializer.cs
@@ -18,7 +18,7 @@ namespace Microsoft.OData.Json
using Microsoft.OData.Edm.Vocabularies.V1;
using Microsoft.OData.Evaluation;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
@@ -53,7 +53,7 @@ internal void ReadResourceSetContentStart()
if (this.JsonReader.NodeType != JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadResourceSetContentStart(this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadResourceSetContentStart, this.JsonReader.NodeType));
}
this.JsonReader.ReadStartArray();
@@ -177,7 +177,7 @@ internal ODataDeletedResource ReadDeletedResource()
object value = this.JsonReader.GetValue();
if (value != null)
{
- throw new ODataException(Strings.ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject(value));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject, value));
}
}
@@ -187,7 +187,7 @@ internal ODataDeletedResource ReadDeletedResource()
// A deleted object must have at least either the odata id annotation or the key values
if (this.JsonReader.NodeType != JsonNodeType.Property)
{
- throw new ODataException(Strings.ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties);
+ throw new ODataException(SRResources.ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties);
}
// If the next property is the id property - read it.
@@ -264,7 +264,7 @@ internal ODataDeletedResource ReadDeletedEntry()
if (this.JsonReader.NodeType == JsonNodeType.StartObject || this.JsonReader.NodeType == JsonNodeType.StartArray)
{
- throw new ODataException(Strings.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
+ throw new ODataException(SRResources.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
}
// Ignore unknown primitive properties in a 4.0 deleted entry
@@ -590,14 +590,14 @@ internal void ReadTopLevelResourceSetAnnotations(ODataResourceSetBase resourceSe
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
break;
case PropertyParsingResult.PropertyWithoutValue:
// If we find a property without a value it means that we did not find the resource set property (yet)
// but an invalid property annotation
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet, propertyName));
case PropertyParsingResult.EndOfObject:
break;
@@ -605,14 +605,14 @@ internal void ReadTopLevelResourceSetAnnotations(ODataResourceSetBase resourceSe
case PropertyParsingResult.MetadataReferenceProperty:
if (!(resourceSet is ODataResourceSet))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
this.ReadMetadataReferencePropertyValue((ODataResourceSet)resourceSet, propertyName);
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonResourceDeserializer_ReadTopLevelResourceSetAnnotations));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonResourceDeserializer_ReadTopLevelResourceSetAnnotations));
}
});
@@ -634,7 +634,7 @@ internal void ReadTopLevelResourceSetAnnotations(ODataResourceSetBase resourceSe
if (forResourceSetStart && !readAllResourceSetProperties)
{
// We did not find any properties or only instance annotations.
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound, ODataJsonConstants.ODataValuePropertyName));
}
}
@@ -751,14 +751,14 @@ internal object ReadEntryPropertyAnnotationValue(string propertyAnnotationName)
this.JsonReader.Read();
if (entityReferenceLinks.Count == 0)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_EmptyBindArray(ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_EmptyBindArray, ODataAnnotationNames.ODataBind));
}
return entityReferenceLinks;
case ODataAnnotationNames.ODataDeltaLink: // Delta links are not supported on expanded resource sets.
default:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyAnnotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyAnnotationName));
}
}
@@ -792,12 +792,12 @@ internal object ReadEntryInstanceAnnotation(string annotationName, bool anyPrope
// We already read the odata.type if it was the first property in ReadResourceStart, so any other occurrence means
// that it was not the first property.
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst);
+ throw new ODataException(SRResources.ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst);
case ODataAnnotationNames.ODataId: // 'odata.id'
if (anyPropertyFound)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty, annotationName));
}
return this.ReadAnnotationStringValueAsUri(annotationName);
@@ -805,7 +805,7 @@ internal object ReadEntryInstanceAnnotation(string annotationName, bool anyPrope
case ODataAnnotationNames.ODataETag: // 'odata.etag'
if (anyPropertyFound)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty, annotationName));
}
return this.ReadAndValidateAnnotationStringValue(annotationName);
@@ -822,7 +822,7 @@ internal object ReadEntryInstanceAnnotation(string annotationName, bool anyPrope
case ODataAnnotationNames.ODataRemoved: // 'odata.removed'
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload);
+ throw new ODataException(SRResources.ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload);
}
default:
@@ -1014,7 +1014,7 @@ internal ODataJsonReaderNestedInfo ReadPropertyWithoutValue(IODataJsonReaderReso
if (!readerNestedResourceInfo.HasEntityReferenceLink)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink(propertyName, ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink, propertyName, ODataAnnotationNames.ODataBind));
}
}
@@ -1112,7 +1112,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(nest
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedDeferredLinkPropertyAnnotation(nestedResourceInfo.Name, propertyAnnotation.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedDeferredLinkPropertyAnnotation, nestedResourceInfo.Name, propertyAnnotation.Key));
}
}
@@ -1137,7 +1137,7 @@ private void ReadExpandedResourceSetAnnotationsAtResourceSetEnd(ODataResourceSet
{
if (!this.ReadingResponse)
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation(propertyName, annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation, propertyName, annotationName));
}
// Read over the property name.
@@ -1148,7 +1148,7 @@ private void ReadExpandedResourceSetAnnotationsAtResourceSetEnd(ODataResourceSet
case ODataAnnotationNames.ODataNextLink:
if (resourceSet.NextPageLink != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation(ODataAnnotationNames.ODataNextLink, expandedNestedResourceInfo.NestedResourceInfo.Name));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation, ODataAnnotationNames.ODataNextLink, expandedNestedResourceInfo.NestedResourceInfo.Name));
}
// Read the property value.
@@ -1158,7 +1158,7 @@ private void ReadExpandedResourceSetAnnotationsAtResourceSetEnd(ODataResourceSet
case ODataAnnotationNames.ODataCount:
if (resourceSet.Count != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation(ODataAnnotationNames.ODataCount, expandedNestedResourceInfo.NestedResourceInfo.Name));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation, ODataAnnotationNames.ODataCount, expandedNestedResourceInfo.NestedResourceInfo.Name));
}
// Read the property value.
@@ -1167,7 +1167,7 @@ private void ReadExpandedResourceSetAnnotationsAtResourceSetEnd(ODataResourceSet
case ODataAnnotationNames.ODataDeltaLink: // Delta links are not supported on expanded resource sets.
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet(annotationName, expandedNestedResourceInfo.NestedResourceInfo.Name));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet, annotationName, expandedNestedResourceInfo.NestedResourceInfo.Name));
}
}
}
@@ -1751,7 +1751,7 @@ private ODataJsonReaderNestedInfo ReadUndeclaredProperty(IODataJsonReaderResourc
// Property without a value can't be ignored if we don't know what it is.
if (!propertyWithValue)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType, propertyName));
}
// Validate that the property doesn't have unrecognized annotations
@@ -1864,7 +1864,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(stre
break;
default:
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedStreamPropertyAnnotation(streamPropertyName, propertyAnnotation.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedStreamPropertyAnnotation, streamPropertyName, propertyAnnotation.Key));
}
}
@@ -1873,7 +1873,7 @@ in resourceState.PropertyAndAnnotationCollector.GetODataPropertyAnnotations(stre
{
if (streamInfo.ETag != null || streamInfo.EditLink != null || streamInfo.ReadLink != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_StreamPropertyInRequest(streamPropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_StreamPropertyInRequest, streamPropertyName));
}
}
}
@@ -1899,7 +1899,7 @@ private void ReadSingleOperationValue(IODataJsonOperationsDeserializerContext re
if (readerContext.JsonReader.NodeType != JsonNodeType.StartObject)
{
- throw new ODataException(ODataErrorStrings.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue(metadataReferencePropertyName, readerContext.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue, metadataReferencePropertyName, readerContext.JsonReader.NodeType));
}
// read over the start-object node of the metadata object for the operations
@@ -1930,7 +1930,7 @@ private void ReadSingleOperationValue(IODataJsonOperationsDeserializerContext re
case JsonConstants.ODataOperationTitleName:
if (operation.Title != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(operationPropertyName, metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation, operationPropertyName, metadataReferencePropertyName));
}
string titleString = readerContext.JsonReader.ReadStringValue(JsonConstants.ODataOperationTitleName);
@@ -1941,7 +1941,7 @@ private void ReadSingleOperationValue(IODataJsonOperationsDeserializerContext re
case JsonConstants.ODataOperationTargetName:
if (operation.Target != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(operationPropertyName, metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation, operationPropertyName, metadataReferencePropertyName));
}
string targetString = readerContext.JsonReader.ReadStringValue(JsonConstants.ODataOperationTargetName);
@@ -1959,7 +1959,7 @@ private void ReadSingleOperationValue(IODataJsonOperationsDeserializerContext re
if (operation.Target == null && insideArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_OperationMissingTargetProperty(metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_OperationMissingTargetProperty, metadataReferencePropertyName));
}
// read the end-object node of the target / title pair
@@ -1985,7 +1985,7 @@ private void ReadSingleOperationValue(ODataResourceSet resourceSet, string metad
if (this.JsonReader.NodeType != JsonNodeType.StartObject)
{
- throw new ODataException(ODataErrorStrings.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue(metadataReferencePropertyName, this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue, metadataReferencePropertyName, this.JsonReader.NodeType));
}
// read over the start-object node of the metadata object for the operations
@@ -2016,7 +2016,7 @@ private void ReadSingleOperationValue(ODataResourceSet resourceSet, string metad
case JsonConstants.ODataOperationTitleName:
if (operation.Title != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(operationPropertyName, metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation, operationPropertyName, metadataReferencePropertyName));
}
string titleString = this.JsonReader.ReadStringValue(JsonConstants.ODataOperationTitleName);
@@ -2027,7 +2027,7 @@ private void ReadSingleOperationValue(ODataResourceSet resourceSet, string metad
case JsonConstants.ODataOperationTargetName:
if (operation.Target != null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(operationPropertyName, metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation, operationPropertyName, metadataReferencePropertyName));
}
string targetString = this.JsonReader.ReadStringValue(JsonConstants.ODataOperationTargetName);
@@ -2045,7 +2045,7 @@ private void ReadSingleOperationValue(ODataResourceSet resourceSet, string metad
if (operation.Target == null && insideArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_OperationMissingTargetProperty(metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_OperationMissingTargetProperty, metadataReferencePropertyName));
}
// read the end-object node of the target / title pair
@@ -2227,7 +2227,7 @@ private void ValidateCanReadMetadataReferenceProperty()
{
if (!this.ReadingResponse)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_MetadataReferencePropertyInRequest);
+ throw new ODataException(SRResources.ODataJsonResourceDeserializer_MetadataReferencePropertyInRequest);
}
}
@@ -2319,7 +2319,7 @@ internal async Task ReadResourceSetContentStartAsync()
if (this.JsonReader.NodeType != JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_CannotReadResourceSetContentStart(this.JsonReader.NodeType));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_CannotReadResourceSetContentStart, this.JsonReader.NodeType));
}
await this.JsonReader.ReadStartArrayAsync()
@@ -2463,7 +2463,7 @@ await this.JsonReader.ReadAsync()
else if ((removedValue = await this.JsonReader.GetValueAsync().ConfigureAwait(false)) != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject(removedValue));
+ Error.Format(SRResources.ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject, removedValue));
}
// Read over end object or null value
@@ -2473,7 +2473,7 @@ await this.JsonReader.ReadAsync()
// A deleted object must have at least either the odata id annotation or the key values
if (this.JsonReader.NodeType != JsonNodeType.Property)
{
- throw new ODataException(ODataErrorStrings.ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties);
+ throw new ODataException(SRResources.ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties);
}
// If the next property is the id property - read it.
@@ -2561,7 +2561,7 @@ await this.JsonReader.ReadAsync()
if (this.JsonReader.NodeType == JsonNodeType.StartObject || this.JsonReader.NodeType == JsonNodeType.StartArray)
{
- throw new ODataException(ODataErrorStrings.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
+ throw new ODataException(SRResources.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
}
// Ignore unknown primitive properties in a 4.0 deleted entry
@@ -2905,14 +2905,14 @@ await this.JsonReader.SkipValueAsync()
}
else
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
break;
case PropertyParsingResult.PropertyWithoutValue:
// If we find a property without a value it means that we did not find the resource set property (yet)
// but an invalid property annotation
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet, propertyName));
case PropertyParsingResult.EndOfObject:
break;
@@ -2920,7 +2920,7 @@ await this.JsonReader.SkipValueAsync()
case PropertyParsingResult.MetadataReferenceProperty:
if (!(resourceSet is ODataResourceSet))
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
await this.ReadMetadataReferencePropertyValueAsync((ODataResourceSet)resourceSet, propertyName)
@@ -2928,7 +2928,7 @@ await this.ReadMetadataReferencePropertyValueAsync((ODataResourceSet)resourceSet
break;
default:
- throw new ODataException(ODataErrorStrings.General_InternalError(InternalErrorCodes.ODataJsonResourceDeserializer_ReadTopLevelResourceSetAnnotations));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataJsonResourceDeserializer_ReadTopLevelResourceSetAnnotations));
}
}).ConfigureAwait(false);
@@ -2950,7 +2950,7 @@ await this.ReadMetadataReferencePropertyValueAsync((ODataResourceSet)resourceSet
if (forResourceSetStart && !readAllResourceSetProperties)
{
// We did not find any properties or only instance annotations.
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound, ODataJsonConstants.ODataValuePropertyName));
}
}
@@ -3083,14 +3083,14 @@ await this.JsonReader.ReadAsync()
.ConfigureAwait(false);
if (entityReferenceLinks.Count == 0)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_EmptyBindArray(ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_EmptyBindArray, ODataAnnotationNames.ODataBind));
}
return entityReferenceLinks;
case ODataAnnotationNames.ODataDeltaLink: // Delta links are not supported on expanded resource sets.
default:
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties(propertyAnnotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties, propertyAnnotationName));
}
}
@@ -3132,13 +3132,13 @@ internal async Task ReadEntryInstanceAnnotationAsync(
// We already read the odata.type if it was the first property in ReadResourceStart, so any other occurrence means
// that it was not the first property.
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst);
+ throw new ODataException(SRResources.ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst);
case ODataAnnotationNames.ODataId: // 'odata.id'
if (anyPropertyFound)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty(annotationName));
+ Error.Format(SRResources.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty, annotationName));
}
return await this.ReadAnnotationStringValueAsUriAsync(annotationName)
@@ -3148,7 +3148,7 @@ internal async Task ReadEntryInstanceAnnotationAsync(
if (anyPropertyFound)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty(annotationName));
+ Error.Format(SRResources.ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty, annotationName));
}
return await this.ReadAndValidateAnnotationStringValueAsync(annotationName)
@@ -3168,7 +3168,7 @@ internal async Task ReadEntryInstanceAnnotationAsync(
case ODataAnnotationNames.ODataRemoved: // 'odata.removed'
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload);
+ throw new ODataException(SRResources.ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload);
}
default:
@@ -3288,7 +3288,7 @@ internal async Task ReadPropertyWithoutValueAsync(IOD
if (!readerNestedResourceInfo.HasEntityReferenceLink)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink(propertyName, ODataAnnotationNames.ODataBind));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink, propertyName, ODataAnnotationNames.ODataBind));
}
}
@@ -3370,7 +3370,7 @@ private async Task ReadExpandedResourceSetAnnotationsAtResourceSetEndAsync(
if (!this.ReadingResponse)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation(propertyName, annotationName));
+ Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation, propertyName, annotationName));
}
// Read over the property name.
@@ -3383,7 +3383,7 @@ await this.JsonReader.ReadAsync()
if (resourceSet.NextPageLink != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation,
ODataAnnotationNames.ODataNextLink,
expandedNestedResourceInfo.NestedResourceInfo.Name));
}
@@ -3397,7 +3397,7 @@ await this.JsonReader.ReadAsync()
if (resourceSet.Count != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation,
ODataAnnotationNames.ODataCount,
expandedNestedResourceInfo.NestedResourceInfo.Name));
}
@@ -3410,7 +3410,7 @@ await this.JsonReader.ReadAsync()
case ODataAnnotationNames.ODataDeltaLink: // Delta links are not supported on expanded resource sets.
default:
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet,
annotationName,
expandedNestedResourceInfo.NestedResourceInfo.Name));
}
@@ -3986,7 +3986,7 @@ await this.JsonReader.SkipValueAsync()
// Property without a value can't be ignored if we don't know what it is.
if (!propertyWithValue)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType, propertyName));
}
// Validate that the property doesn't have unrecognized annotations
@@ -4039,7 +4039,7 @@ private async Task ReadSingleOperationValueAsync(
if (readerContext.JsonReader.NodeType != JsonNodeType.StartObject)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue(
+ Error.Format(SRResources.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue,
metadataReferencePropertyName,
readerContext.JsonReader.NodeType));
}
@@ -4078,7 +4078,7 @@ await readerContext.JsonReader.ReadEndObjectAsync()
if (operation.Title != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation,
operationPropertyName,
metadataReferencePropertyName));
}
@@ -4093,7 +4093,7 @@ await readerContext.JsonReader.ReadEndObjectAsync()
if (operation.Target != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation,
operationPropertyName,
metadataReferencePropertyName));
}
@@ -4115,7 +4115,7 @@ await readerContext.JsonReader.SkipValueAsync()
if (operation.Target == null && insideArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_OperationMissingTargetProperty(metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_OperationMissingTargetProperty, metadataReferencePropertyName));
}
// read the end-object node of the target / title pair
@@ -4144,7 +4144,7 @@ private async Task ReadSingleOperationValueAsync(ODataResourceSet resourceSet, s
if (this.JsonReader.NodeType != JsonNodeType.StartObject)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue(metadataReferencePropertyName, this.JsonReader.NodeType));
+ Error.Format(SRResources.ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue, metadataReferencePropertyName, this.JsonReader.NodeType));
}
// read over the start-object node of the metadata object for the operations
@@ -4181,7 +4181,7 @@ await this.JsonReader.ReadEndObjectAsync()
if (operation.Title != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation,
operationPropertyName,
metadataReferencePropertyName));
}
@@ -4196,7 +4196,7 @@ await this.JsonReader.ReadEndObjectAsync()
if (operation.Target != null)
{
throw new ODataException(
- ODataErrorStrings.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation(
+ Error.Format(SRResources.ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation,
operationPropertyName,
metadataReferencePropertyName));
}
@@ -4218,7 +4218,7 @@ await this.JsonReader.SkipValueAsync()
if (operation.Target == null && insideArray)
{
- throw new ODataException(ODataErrorStrings.ODataJsonResourceDeserializer_OperationMissingTargetProperty(metadataReferencePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceDeserializer_OperationMissingTargetProperty, metadataReferencePropertyName));
}
// Read the end-object node of the target / title pair
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonResourceSerializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonResourceSerializer.cs
index c13dedeed3..50ac30406d 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonResourceSerializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonResourceSerializer.cs
@@ -9,6 +9,7 @@
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.OData.Core;
using Microsoft.OData.Edm;
namespace Microsoft.OData.Json
@@ -771,14 +772,14 @@ private void ValidateOperationMetadataGroup(IGrouping op
if (operations.Count() > 1 && operations.Any(o => o.Target == null))
{
- throw new ODataException(Strings.ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustSpecifyTarget(operations.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustSpecifyTarget, operations.Key));
}
foreach (IGrouping operationsByTarget in operations.GroupBy(this.GetOperationTargetUriString))
{
if (operationsByTarget.Count() > 1)
{
- throw new ODataException(Strings.ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustNotHaveDuplicateTarget(operations.Key, operationsByTarget.Key));
+ throw new ODataException(Error.Format(SRResources.ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustNotHaveDuplicateTarget, operations.Key, operationsByTarget.Key));
}
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonSerializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonSerializer.cs
index 1862892771..bbc656a51f 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonSerializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonSerializer.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Diagnostics;
@@ -363,7 +364,7 @@ internal string UriToString(Uri uri)
// TODO: Check if it is dead code to be removed.
if (metadataDocumentUri == null)
{
- throw new ODataException(Strings.ODataJsonSerializer_RelativeUriUsedWithoutMetadataDocumentUriOrMetadata(UriUtils.UriToString(resultUri)));
+ throw new ODataException(Error.Format(SRResources.ODataJsonSerializer_RelativeUriUsedWithoutMetadataDocumentUriOrMetadata, UriUtils.UriToString(resultUri)));
}
resultUri = UriUtils.UriToAbsoluteUri(metadataDocumentUri, uri);
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentDeserializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentDeserializer.cs
index fbb8f009f2..edeb8924f2 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentDeserializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentDeserializer.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -124,7 +125,7 @@ private ODataServiceDocument ReadServiceDocumentImplementation(PropertyAndAnnota
while (this.JsonReader.NodeType == JsonNodeType.Property)
{
// Property annotations are not allowed on the 'value' property, so fail if we see one.
- Func readPropertyAnnotationInServiceDoc = annotationName => { throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument(annotationName, ODataJsonConstants.ODataValuePropertyName)); };
+ Func readPropertyAnnotationInServiceDoc = annotationName => { throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument, annotationName, ODataJsonConstants.ODataValuePropertyName)); };
this.ProcessProperty(
propertyAndAnnotationCollector,
@@ -140,14 +141,14 @@ private ODataServiceDocument ReadServiceDocumentImplementation(PropertyAndAnnota
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument, propertyName, ODataJsonConstants.ODataValuePropertyName));
case PropertyParsingResult.CustomInstanceAnnotation:
this.JsonReader.SkipValue();
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
@@ -155,7 +156,7 @@ private ODataServiceDocument ReadServiceDocumentImplementation(PropertyAndAnnota
// Fail if we've already processed a 'value' property.
if (serviceDocumentElements[0] != null)
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument, ODataJsonConstants.ODataValuePropertyName));
}
serviceDocumentElements[0] = new List();
@@ -180,7 +181,7 @@ private ODataServiceDocument ReadServiceDocumentImplementation(PropertyAndAnnota
}
else
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument(propertyName, ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument, propertyName, ODataJsonConstants.ODataValuePropertyName));
}
break;
@@ -188,14 +189,14 @@ private ODataServiceDocument ReadServiceDocumentImplementation(PropertyAndAnnota
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(Strings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
});
}
if (serviceDocumentElements[0] == null)
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument(ODataJsonConstants.ODataValuePropertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument, ODataJsonConstants.ODataValuePropertyName));
}
// Read over the end object (nothing else can happen after all properties have been read)
@@ -234,7 +235,7 @@ private ODataServiceDocumentElement ReadServiceDocumentElement(PropertyAndAnnota
// OData property annotations are not supported in service document element objects.
Func propertyAnnotationValueReader = annotationName =>
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement, annotationName));
};
this.ProcessProperty(
@@ -251,17 +252,17 @@ private ODataServiceDocumentElement ReadServiceDocumentElement(PropertyAndAnnota
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement, propertyName));
case PropertyParsingResult.CustomInstanceAnnotation:
this.JsonReader.SkipValue();
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(Strings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (string.Equals(ODataJsonConstants.ODataServiceDocumentElementName, propertyName, StringComparison.Ordinal))
@@ -291,7 +292,7 @@ private ODataServiceDocumentElement ReadServiceDocumentElement(PropertyAndAnnota
}
else
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement,
propertyName,
ODataJsonConstants.ODataServiceDocumentElementName,
ODataJsonConstants.ODataServiceDocumentElementUrlName));
@@ -346,7 +347,7 @@ private async Task ReadServiceDocumentImplementationAsync(
// Property annotations are not allowed on the 'value' property, so fail if we see one.
Func> readPropertyAnnotationInServiceDocumentAsync = annotationName =>
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument,
annotationName,
ODataJsonConstants.ODataValuePropertyName));
};
@@ -366,7 +367,7 @@ await this.JsonReader.ReadAsync()
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument,
propertyName,
ODataJsonConstants.ODataValuePropertyName));
@@ -376,7 +377,7 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (string.Equals(ODataJsonConstants.ODataValuePropertyName, propertyName, StringComparison.Ordinal))
@@ -384,7 +385,7 @@ await this.JsonReader.SkipValueAsync()
// Fail if we've already processed a 'value' property.
if (serviceDocumentElements[0] != null)
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument,
ODataJsonConstants.ODataValuePropertyName));
}
@@ -413,7 +414,7 @@ await this.JsonReader.ReadEndArrayAsync()
}
else
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument,
propertyName,
ODataJsonConstants.ODataValuePropertyName));
}
@@ -423,14 +424,14 @@ await this.JsonReader.ReadEndArrayAsync()
break;
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(Strings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
}
}).ConfigureAwait(false);
}
if (serviceDocumentElements[0] == null)
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument,
ODataJsonConstants.ODataValuePropertyName));
}
@@ -478,7 +479,7 @@ await this.JsonReader.ReadStartObjectAsync()
// OData property annotations are not supported in service document element objects.
Func> propertyAnnotationValueReaderAsync = annotationName =>
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement(annotationName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement, annotationName));
};
await this.ProcessPropertyAsync(
@@ -496,7 +497,7 @@ await this.JsonReader.ReadAsync()
switch (propertyParsingResult)
{
case PropertyParsingResult.ODataInstanceAnnotation:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement, propertyName));
case PropertyParsingResult.CustomInstanceAnnotation:
await this.JsonReader.SkipValueAsync()
@@ -504,10 +505,10 @@ await this.JsonReader.SkipValueAsync()
break;
case PropertyParsingResult.PropertyWithoutValue:
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty, propertyName));
case PropertyParsingResult.MetadataReferenceProperty:
- throw new ODataException(Strings.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty, propertyName));
case PropertyParsingResult.PropertyWithValue:
if (string.Equals(ODataJsonConstants.ODataServiceDocumentElementName, propertyName, StringComparison.Ordinal))
@@ -541,7 +542,7 @@ await this.JsonReader.SkipValueAsync()
}
else
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement(
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement,
propertyName,
ODataJsonConstants.ODataServiceDocumentElementName,
ODataJsonConstants.ODataServiceDocumentElementUrlName));
@@ -613,7 +614,7 @@ private static void ValidateServiceDocumentElementHasNoRepeatedProperty(string p
if (propertyValues[0] != null)
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocumentElement(property));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocumentElement, property));
}
}
@@ -628,7 +629,7 @@ private static void ValidateServiceDocumentElementHasRequiredProperty(string pro
if (string.IsNullOrEmpty(propertyValues[0]))
{
- throw new ODataException(Strings.ODataJsonServiceDocumentDeserializer_MissingRequiredPropertyInServiceDocumentElement(property));
+ throw new ODataException(Error.Format(SRResources.ODataJsonServiceDocumentDeserializer_MissingRequiredPropertyInServiceDocumentElement, property));
}
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentSerializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentSerializer.cs
index 56cca97835..bb5ffa8af7 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentSerializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonServiceDocumentSerializer.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -74,7 +75,7 @@ internal void WriteServiceDocument(ODataServiceDocument serviceDocument)
{
if (functionImportInfo == null)
{
- throw new ODataException(Strings.ValidationUtils_WorkspaceResourceMustNotContainNullItem);
+ throw new ODataException(SRResources.ValidationUtils_WorkspaceResourceMustNotContainNullItem);
}
if (!functionImportsWritten.Contains(functionImportInfo.Name))
@@ -187,7 +188,7 @@ await thisParam.WriteServiceDocumentElementAsync(singletonInfo, ODataJsonConstan
{
if (functionImportInfo == null)
{
- throw new ODataException(Strings.ValidationUtils_WorkspaceResourceMustNotContainNullItem);
+ throw new ODataException(SRResources.ValidationUtils_WorkspaceResourceMustNotContainNullItem);
}
if (!functionImportsWritten.Contains(functionImportInfo.Name))
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonValidationUtils.cs b/src/Microsoft.OData.Core/Json/ODataJsonValidationUtils.cs
index c93a64a3bb..be94ab7d37 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonValidationUtils.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonValidationUtils.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Diagnostics;
@@ -41,12 +42,12 @@ internal static void ValidateMetadataReferencePropertyName(Uri metadataDocumentU
!ODataJsonUtils.IsMetadataReferenceProperty(propertyName) ||
propertyName[propertyName.Length - 1] == ODataConstants.ContextUriFragmentIndicator)
{
- throw new ODataException(Strings.ValidationUtils_InvalidMetadataReferenceProperty(propertyName));
+ throw new ODataException(Error.Format(SRResources.ValidationUtils_InvalidMetadataReferenceProperty, propertyName));
}
if (IsOpenMetadataReferencePropertyName(metadataDocumentUri, propertyName))
{
- throw new ODataException(Strings.ODataJsonValidationUtils_OpenMetadataReferencePropertyNotSupported(propertyName, UriUtils.UriToString(metadataDocumentUri)));
+ throw new ODataException(Error.Format(SRResources.ODataJsonValidationUtils_OpenMetadataReferencePropertyNotSupported, propertyName, UriUtils.UriToString(metadataDocumentUri)));
}
}
@@ -101,7 +102,7 @@ internal static void ValidateOperationPropertyValueIsNotNull(object propertyValu
if (propertyValue == null)
{
- throw new ODataException(Strings.ODataJsonValidationUtils_OperationPropertyCannotBeNull(propertyName, metadata));
+ throw new ODataException(Error.Format(SRResources.ODataJsonValidationUtils_OperationPropertyCannotBeNull, propertyName, metadata));
}
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonValueSerializer.cs b/src/Microsoft.OData.Core/Json/ODataJsonValueSerializer.cs
index 3e9c533056..ab95ac8ea5 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonValueSerializer.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonValueSerializer.cs
@@ -14,7 +14,7 @@ namespace Microsoft.OData.Json
using System.Threading.Tasks;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
@@ -124,7 +124,7 @@ public virtual void WriteResourceValue(
// In requests, we allow the property type reference to be null if the type name is specified in the OM
if (metadataTypeReference == null && !this.WritingResponse && typeName == null && this.Model.IsUserModel())
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest);
}
// Resolve the type name to the type; if no type name is specified we will use the type inferred from metadata.
@@ -189,7 +189,7 @@ public virtual void WriteCollectionValue(
Debug.Assert(metadataTypeReference == null, "Never expect a metadata type for top-level properties.");
if (typeName == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonValueSerializer_MissingTypeNameOnCollection);
+ throw new ODataException(SRResources.ODataJsonValueSerializer_MissingTypeNameOnCollection);
}
}
else
@@ -197,7 +197,7 @@ public virtual void WriteCollectionValue(
// In requests, we allow the metadata type reference to be null if the type name is specified in the OM
if (metadataTypeReference == null && !this.WritingResponse && typeName == null && this.Model.IsUserModel())
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest);
}
}
@@ -374,7 +374,7 @@ public virtual void WriteUntypedValue(
if (string.IsNullOrEmpty(value.RawValue))
{
- throw new ODataException(ODataErrorStrings.ODataJsonValueSerializer_MissingRawValueOnUntyped);
+ throw new ODataException(SRResources.ODataJsonValueSerializer_MissingRawValueOnUntyped);
}
this.JsonWriter.WriteRawValue(value.RawValue);
@@ -451,7 +451,7 @@ public virtual async Task WriteResourceValueAsync(
// In requests, we allow the property type reference to be null if the type name is specified in the OM
if (metadataTypeReference == null && !this.WritingResponse && typeName == null && this.Model.IsUserModel())
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest);
}
// Resolve the type name to the type; if no type name is specified we will use the type inferred from metadata.
@@ -519,7 +519,7 @@ public virtual async Task WriteCollectionValueAsync(
Debug.Assert(metadataTypeReference == null, "Never expect a metadata type for top-level properties.");
if (typeName == null)
{
- throw new ODataException(ODataErrorStrings.ODataJsonValueSerializer_MissingTypeNameOnCollection);
+ throw new ODataException(SRResources.ODataJsonValueSerializer_MissingTypeNameOnCollection);
}
}
else
@@ -527,7 +527,7 @@ public virtual async Task WriteCollectionValueAsync(
// In requests, we allow the metadata type reference to be null if the type name is specified in the OM
if (metadataTypeReference == null && !this.WritingResponse && typeName == null && this.Model.IsUserModel())
{
- throw new ODataException(ODataErrorStrings.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest);
+ throw new ODataException(SRResources.ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest);
}
}
@@ -714,7 +714,7 @@ public virtual Task WriteUntypedValueAsync(
if (string.IsNullOrEmpty(value.RawValue))
{
- throw new ODataException(ODataErrorStrings.ODataJsonValueSerializer_MissingRawValueOnUntyped);
+ throw new ODataException(SRResources.ODataJsonValueSerializer_MissingRawValueOnUntyped);
}
return this.JsonWriter.WriteRawValueAsync(value.RawValue);
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonWriter.cs b/src/Microsoft.OData.Core/Json/ODataJsonWriter.cs
index 22267b5959..671ae24808 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonWriter.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonWriter.cs
@@ -4,6 +4,7 @@
//
//---------------------------------------------------------------------
+using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Evaluation;
using Microsoft.OData.Metadata;
@@ -779,7 +780,7 @@ protected override void StartDeletedResource(ODataDeletedResource resource)
// Writing a nested deleted resource
if (this.Version == null || this.Version < ODataVersion.V401)
{
- throw new ODataException(Strings.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
+ throw new ODataException(SRResources.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
}
else
{
@@ -1056,7 +1057,7 @@ protected override void WriteEntityReferenceInNavigationLinkContent(ODataNestedR
if (nestedResourceScope.ResourceSetWritten)
{
- throw new ODataException(Strings.ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest);
+ throw new ODataException(SRResources.ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest);
}
if (!nestedResourceScope.EntityReferenceLinkWritten)
@@ -1799,7 +1800,7 @@ protected override async Task StartDeletedResourceAsync(ODataDeletedResource res
// Writing a nested deleted resource
if (this.Version == null || this.Version < ODataVersion.V401)
{
- throw new ODataException(Strings.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
+ throw new ODataException(SRResources.ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry);
}
else
{
@@ -2151,7 +2152,7 @@ protected override async Task WriteEntityReferenceInNavigationLinkContentAsync(
if (nestedResourceScope.ResourceSetWritten)
{
- throw new ODataException(Strings.ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest);
+ throw new ODataException(SRResources.ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest);
}
if (!nestedResourceScope.EntityReferenceLinkWritten)
@@ -2621,7 +2622,7 @@ private void ValidateNoCustomInstanceAnnotationsForExpandedResourceSet(ODataReso
if (resourceSet.InstanceAnnotations.Count > 0)
{
- throw new ODataException(Strings.ODataJsonWriter_InstanceAnnotationNotSupportedOnExpandedResourceSet);
+ throw new ODataException(SRResources.ODataJsonWriter_InstanceAnnotationNotSupportedOnExpandedResourceSet);
}
}
diff --git a/src/Microsoft.OData.Core/Json/ODataJsonWriterUtils.cs b/src/Microsoft.OData.Core/Json/ODataJsonWriterUtils.cs
index df0b8e2214..399a975fe7 100644
--- a/src/Microsoft.OData.Core/Json/ODataJsonWriterUtils.cs
+++ b/src/Microsoft.OData.Core/Json/ODataJsonWriterUtils.cs
@@ -14,7 +14,7 @@ namespace Microsoft.OData.Json
using System.Text;
using System.Threading.Tasks;
using Microsoft.OData.Edm;
- using ODataErrorStrings = Microsoft.OData.Strings;
+ using Microsoft.OData.Core;
#endregion Namespaces
///
@@ -140,14 +140,14 @@ internal static void ODataValueToString(StringBuilder sb, ODataValue value)
else
{
// For unsupported primitive values (e.g. spatial values)
- sb.Append('"').Append(JsonValueUtils.GetEscapedJsonString(ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(valueAsObject.GetType().FullName))).Append('"');
+ sb.Append('"').Append(JsonValueUtils.GetEscapedJsonString(Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, valueAsObject.GetType().FullName))).Append('"');
}
return;
}
// Subclasses of ODataValue that are not supported in ODataInnerError.Properties dictionary
- sb.Append('"').Append(JsonValueUtils.GetEscapedJsonString(ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(value.GetType().FullName))).Append('"');
+ sb.Append('"').Append(JsonValueUtils.GetEscapedJsonString(Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, value.GetType().FullName))).Append('"');
}
///
@@ -380,7 +380,7 @@ private static void ODataCollectionValueToString(StringBuilder sb, ODataCollecti
}
else
{
- sb.Append('"').Append(JsonValueUtils.GetEscapedJsonString(ODataErrorStrings.ODataJsonWriter_UnsupportedValueType(item.GetType().FullName))).Append('"');
+ sb.Append('"').Append(JsonValueUtils.GetEscapedJsonString(Error.Format(SRResources.ODataJsonWriter_UnsupportedValueType, item.GetType().FullName))).Append('"');
}
}
diff --git a/src/Microsoft.OData.Core/Json/PooledByteBufferWriter.cs b/src/Microsoft.OData.Core/Json/PooledByteBufferWriter.cs
index 7c7d693193..d273e5d5df 100644
--- a/src/Microsoft.OData.Core/Json/PooledByteBufferWriter.cs
+++ b/src/Microsoft.OData.Core/Json/PooledByteBufferWriter.cs
@@ -4,6 +4,7 @@
//
//---------------------------------------------------------------------
+using Microsoft.OData.Core;
using System;
using System.Buffers;
using System.Diagnostics;
@@ -203,7 +204,7 @@ private void CheckAndResizeBuffer(int sizeHint)
// If the size still exceeds the max size, then give up and throw an OOM.
if ((uint)newSize > MaximumBufferSize)
{
- throw new OutOfMemoryException(Strings.ODataMessageWriter_Buffer_Maximum_Size_Exceeded(newSize));
+ throw new OutOfMemoryException(Error.Format(SRResources.ODataMessageWriter_Buffer_Maximum_Size_Exceeded, newSize));
}
}
diff --git a/src/Microsoft.OData.Core/Json/ReorderingJsonReader.cs b/src/Microsoft.OData.Core/Json/ReorderingJsonReader.cs
index 296ede61aa..df6de9a5c6 100644
--- a/src/Microsoft.OData.Core/Json/ReorderingJsonReader.cs
+++ b/src/Microsoft.OData.Core/Json/ReorderingJsonReader.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Json
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -47,7 +48,7 @@ public override Stream CreateReadStream()
}
catch (FormatException)
{
- throw new ODataException(Strings.JsonReader_InvalidBinaryFormat(this.GetValue()));
+ throw new ODataException(Error.Format(SRResources.JsonReader_InvalidBinaryFormat, this.GetValue()));
}
this.Read();
@@ -64,7 +65,7 @@ public override TextReader CreateTextReader()
if (this.NodeType == JsonNodeType.Property)
{
// reading JSON
- throw new ODataException(Strings.JsonReader_CannotCreateTextReader);
+ throw new ODataException(SRResources.JsonReader_CannotCreateTextReader);
}
TextReader result = new StringReader(this.GetValue() == null ? "" : (string)this.GetValue());
@@ -112,7 +113,7 @@ public override async Task CreateReadStreamAsync()
}
catch (FormatException)
{
- throw new ODataException(Strings.JsonReader_InvalidBinaryFormat(value));
+ throw new ODataException(Error.Format(SRResources.JsonReader_InvalidBinaryFormat, value));
}
await this.ReadAsync()
@@ -133,7 +134,7 @@ public override async Task CreateTextReaderAsync()
if (this.NodeType == JsonNodeType.Property)
{
// reading JSON
- throw new ODataException(Strings.JsonReader_CannotCreateTextReader);
+ throw new ODataException(SRResources.JsonReader_CannotCreateTextReader);
}
TextReader result;
@@ -518,7 +519,7 @@ private static void ProcessProperty(string jsonPropertyName, out string property
else
{
// unexpected instance annotation name
- throw new ODataException(Microsoft.OData.Strings.JsonReaderExtensions_UnexpectedInstanceAnnotationName(jsonPropertyName));
+ throw new ODataException(Error.Format(SRResources.JsonReaderExtensions_UnexpectedInstanceAnnotationName, jsonPropertyName));
}
}
}
diff --git a/src/Microsoft.OData.Core/MediaTypeUtils.cs b/src/Microsoft.OData.Core/MediaTypeUtils.cs
index 806eee4fa5..dc47779e8f 100644
--- a/src/Microsoft.OData.Core/MediaTypeUtils.cs
+++ b/src/Microsoft.OData.Core/MediaTypeUtils.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Concurrent;
@@ -126,7 +127,7 @@ internal static ODataFormat GetContentTypeFromSettings(
IList supportedMediaTypes = mediaTypeResolver.GetMediaTypeFormats(payloadKind).ToList();
if (supportedMediaTypes == null || supportedMediaTypes.Count == 0)
{
- throw new ODataContentTypeException(Strings.MediaTypeUtils_DidNotFindMatchingMediaType(null, settings.AcceptableMediaTypes));
+ throw new ODataContentTypeException(Error.Format(SRResources.MediaTypeUtils_DidNotFindMatchingMediaType, null, settings.AcceptableMediaTypes));
}
if (settings.UseFormat == true)
@@ -163,7 +164,7 @@ internal static ODataFormat GetContentTypeFromSettings(
{
// We're calling the ToArray here since not all platforms support the string.Join which takes IEnumerable.
string supportedTypesAsString = String.Join(", ", supportedMediaTypes.Select(mt => mt.MediaType.ToText()).ToArray());
- throw new ODataContentTypeException(Strings.MediaTypeUtils_DidNotFindMatchingMediaType(supportedTypesAsString, settings.AcceptableMediaTypes));
+ throw new ODataContentTypeException(Error.Format(SRResources.MediaTypeUtils_DidNotFindMatchingMediaType, supportedTypesAsString, settings.AcceptableMediaTypes));
}
selectedMediaTypeWithFormat = supportedMediaTypes[matchInfo.TargetTypeIndex];
@@ -331,7 +332,7 @@ internal static void CheckMediaTypeForWildCards(ODataMediaType mediaType)
if (HttpUtils.CompareMediaTypeNames(MimeConstants.MimeStar, mediaType.Type) ||
HttpUtils.CompareMediaTypeNames(MimeConstants.MimeStar, mediaType.SubType))
{
- throw new ODataContentTypeException(Strings.ODataMessageReader_WildcardInContentType(mediaType.FullTypeName));
+ throw new ODataContentTypeException(Error.Format(SRResources.ODataMessageReader_WildcardInContentType, mediaType.FullTypeName));
}
}
@@ -352,7 +353,7 @@ internal static string AlterContentTypeForJsonPadding(string contentType)
return contentType.Remove(0, MimeConstants.MimeTextPlain.Length).Insert(0, MimeConstants.TextJavaScript);
}
- throw new ODataException(Strings.ODataMessageWriter_JsonPaddingOnInvalidContentType(contentType));
+ throw new ODataException(Error.Format(SRResources.ODataMessageWriter_JsonPaddingOnInvalidContentType, contentType));
}
///
@@ -406,7 +407,7 @@ internal static ODataFormat GetFormatFromContentType(string contentTypeName, ODa
// We're calling the ToArray here since not all platforms support the string.Join which takes IEnumerable.
var str = String.Join(", ", mediaTypeResolver.GetMediaTypeFormats(supportedPayloadKinds[0]).ToList().Select(x => x.MediaType));
string supportedTypesAsString = String.Join(", ", supportedPayloadKinds.SelectMany(pk => mediaTypeResolver.GetMediaTypeFormats(pk).Select(mt => mt.MediaType.ToText())).ToArray());
- throw new ODataContentTypeException(Strings.MediaTypeUtils_CannotDetermineFormatFromContentType(str, contentTypeName));
+ throw new ODataContentTypeException(Error.Format(SRResources.MediaTypeUtils_CannotDetermineFormatFromContentType, str, contentTypeName));
}
///
@@ -432,7 +433,7 @@ private static ODataMediaType ParseContentType(string contentTypeHeader, out str
IList> specifiedTypes = HttpUtils.MediaTypesFromString(contentTypeHeader);
if (specifiedTypes.Count != 1)
{
- throw new ODataContentTypeException(Strings.MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified(contentTypeHeader));
+ throw new ODataContentTypeException(Error.Format(SRResources.MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified, contentTypeHeader));
}
ODataMediaType contentType = specifiedTypes[0].Key;
@@ -465,7 +466,7 @@ private static ODataMediaType GetDefaultMediaType(
}
}
- throw new ODataException(Strings.ODataUtils_DidNotFindDefaultMediaType(specifiedFormat));
+ throw new ODataException(Error.Format(SRResources.ODataUtils_DidNotFindDefaultMediaType, specifiedFormat));
}
///
diff --git a/src/Microsoft.OData.Core/MessageStreamWrapper.cs b/src/Microsoft.OData.Core/MessageStreamWrapper.cs
index dedd6b5e9b..2ddf14e789 100644
--- a/src/Microsoft.OData.Core/MessageStreamWrapper.cs
+++ b/src/Microsoft.OData.Core/MessageStreamWrapper.cs
@@ -4,6 +4,7 @@
//
//---------------------------------------------------------------------
+using Microsoft.OData.Core;
using System.Diagnostics;
using System.IO;
using System.Threading;
@@ -264,7 +265,7 @@ private void IncreaseTotalBytesRead(int bytesRead)
this.totalBytesRead += bytesRead < 0 ? 0 : bytesRead;
if (this.totalBytesRead > this.maxBytesToBeRead)
{
- throw new ODataException(Strings.MessageStreamWrappingStream_ByteLimitExceeded(this.totalBytesRead, this.maxBytesToBeRead));
+ throw new ODataException(Error.Format(SRResources.MessageStreamWrappingStream_ByteLimitExceeded, this.totalBytesRead, this.maxBytesToBeRead));
}
}
}
diff --git a/src/Microsoft.OData.Core/Metadata/BufferingXmlReader.cs b/src/Microsoft.OData.Core/Metadata/BufferingXmlReader.cs
index 8f22f20e08..40a92b7c93 100644
--- a/src/Microsoft.OData.Core/Metadata/BufferingXmlReader.cs
+++ b/src/Microsoft.OData.Core/Metadata/BufferingXmlReader.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Metadata
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -454,7 +455,7 @@ public override bool Read()
if (this.documentBaseUri == null)
{
// If there's no document base URI we need to fail since there's no way to create an absolute URI now.
- throw new ODataException(Strings.ODataXmlDeserializer_RelativeUriUsedWithoutBaseUriSpecified(xmlBaseAttributeValue));
+ throw new ODataException(Error.Format(SRResources.ODataXmlDeserializer_RelativeUriUsedWithoutBaseUriSpecified, xmlBaseAttributeValue));
}
newBaseUri = UriUtils.UriToAbsoluteUri(this.documentBaseUri, newBaseUri);
@@ -775,7 +776,7 @@ public override bool MoveToAttribute(string name)
public override void ResolveEntity()
{
// We don't support entity references, and we should never get a reader which does.
- throw new InvalidOperationException(Strings.ODataException_GeneralError);
+ throw new InvalidOperationException(SRResources.ODataException_GeneralError);
}
///
diff --git a/src/Microsoft.OData.Core/Metadata/EdmLibraryExtensions.cs b/src/Microsoft.OData.Core/Metadata/EdmLibraryExtensions.cs
index 63e3b218f7..33434a40f0 100644
--- a/src/Microsoft.OData.Core/Metadata/EdmLibraryExtensions.cs
+++ b/src/Microsoft.OData.Core/Metadata/EdmLibraryExtensions.cs
@@ -22,13 +22,12 @@ namespace Microsoft.OData.Metadata
using ErrorStrings = Microsoft.OData.Service.Strings;
#endif
#if ODATA_CLIENT
- using ErrorStrings = Microsoft.OData.Client.Strings;
+ using Microsoft.OData.Client;
#endif
#if !ODATA_SERVICE && !ODATA_CLIENT
using Microsoft.OData.Json;
using Microsoft.OData.UriParser;
- using ErrorStrings = Microsoft.OData.Strings;
- using PlatformHelper = Microsoft.OData.PlatformHelper;
+ using Microsoft.OData.Core;
#endif
#endregion Namespaces
@@ -734,7 +733,7 @@ internal static bool IsAssignableFrom(this IEdmType baseType, IEdmType subtype)
return baseType.IsEquivalentTo(subtype);
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_IsAssignableFrom_Type));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_IsAssignableFrom_Type));
}
}
@@ -900,7 +899,7 @@ internal static IEdmPrimitiveType BaseType(this IEdmPrimitiveType type)
return EdmCoreModel.Instance.GetPrimitiveType(EdmPrimitiveTypeKind.GeometryCollection);
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_BaseType));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_BaseType));
}
}
@@ -980,7 +979,7 @@ internal static object ConvertToUnderlyingTypeIfUIntValue(this IEdmModel model,
}
catch (OverflowException)
{
- throw new ODataException(ErrorStrings.EdmLibraryExtensions_ValueOverflowForUnderlyingType(value, expectedTypeReference.FullName()));
+ throw new ODataException(Error.Format(SRResources.EdmLibraryExtensions_ValueOverflowForUnderlyingType, value, expectedTypeReference.FullName()));
}
}
@@ -1240,7 +1239,7 @@ internal static IEdmTypeReference Clone(this IEdmTypeReference typeReference, bo
return new EdmSpatialTypeReference(primitiveType, nullable, spatialTypeReference.SpatialReferenceIdentifier);
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_Clone_PrimitiveTypeKind));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_Clone_PrimitiveTypeKind));
}
case EdmTypeKind.Entity:
@@ -1260,7 +1259,7 @@ internal static IEdmTypeReference Clone(this IEdmTypeReference typeReference, bo
case EdmTypeKind.None: // fall through
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_Clone_TypeKind));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_Clone_TypeKind));
}
}
@@ -1458,7 +1457,7 @@ internal static bool IsAssignableFrom(this IEdmPrimitiveType baseType, IEdmPrimi
return subTypeKind == EdmPrimitiveTypeKind.GeometryMultiPoint;
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_IsAssignableFrom_Primitive));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_IsAssignableFrom_Primitive));
}
}
@@ -1634,7 +1633,7 @@ internal static IEdmTypeReference ToTypeReference(this IEdmType type, bool nulla
return new EdmTypeDefinitionReference((IEdmTypeDefinition)type, nullable);
case EdmTypeKind.None:
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_ToTypeReference));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_ToTypeReference));
}
}
@@ -1834,7 +1833,7 @@ private static IEnumerable ValidateOperationGroupReturnsOnlyOnKin
{
if (operation.SchemaElementKind != operationKind)
{
- throw new ODataException(ErrorStrings.EdmLibraryExtensions_OperationGroupReturningActionsAndFunctionsModelInvalid(operationNameWithoutParameterTypes));
+ throw new ODataException(Error.Format(SRResources.EdmLibraryExtensions_OperationGroupReturningActionsAndFunctionsModelInvalid, operationNameWithoutParameterTypes));
}
}
@@ -1896,7 +1895,7 @@ private static string GetCollectionItemTypeName(string typeName, bool isNested)
{
if (isNested)
{
- throw new ODataException(ErrorStrings.ValidationUtils_NestedCollectionsAreNotSupported);
+ throw new ODataException(SRResources.ValidationUtils_NestedCollectionsAreNotSupported);
}
string innerTypeName = typeName.Substring(collectionTypeQualifierLength + 1, typeName.Length - (collectionTypeQualifierLength + 2));
@@ -2022,12 +2021,12 @@ private static void EnsureOperationBoundWithBindingParameter(this IEdmOperation
{
if (!operation.IsBound)
{
- throw new ODataException(ErrorStrings.EdmLibraryExtensions_UnBoundOperationsFoundFromIEdmModelFindMethodIsInvalid(operation.Name));
+ throw new ODataException(Error.Format(SRResources.EdmLibraryExtensions_UnBoundOperationsFoundFromIEdmModelFindMethodIsInvalid, operation.Name));
}
if (!operation.Parameters.Any())
{
- throw new ODataException(ErrorStrings.EdmLibraryExtensions_NoParameterBoundOperationsFoundFromIEdmModelFindMethodIsInvalid(operation.Name));
+ throw new ODataException(Error.Format(SRResources.EdmLibraryExtensions_NoParameterBoundOperationsFoundFromIEdmModelFindMethodIsInvalid, operation.Name));
}
}
#endif
@@ -2086,7 +2085,7 @@ private static EdmPrimitiveTypeReference ToTypeReference(IEdmPrimitiveType primi
case EdmPrimitiveTypeKind.GeometryCollection:
return new EdmSpatialTypeReference(primitiveType, nullable);
default:
- throw new ODataException(ErrorStrings.General_InternalError(InternalErrorCodesCommon.EdmLibraryExtensions_PrimitiveTypeReference));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodesCommon.EdmLibraryExtensions_PrimitiveTypeReference));
}
}
diff --git a/src/Microsoft.OData.Core/Metadata/EdmTypeWriterResolver.cs b/src/Microsoft.OData.Core/Metadata/EdmTypeWriterResolver.cs
index 6cdc47c826..c2ef3c42ca 100644
--- a/src/Microsoft.OData.Core/Metadata/EdmTypeWriterResolver.cs
+++ b/src/Microsoft.OData.Core/Metadata/EdmTypeWriterResolver.cs
@@ -10,6 +10,7 @@ namespace Microsoft.OData.Metadata
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
#endregion Namespaces
@@ -55,7 +56,7 @@ internal override IEdmTypeReference GetReturnType(IEdmOperationImport operationI
/// The representing the return type fo the .
internal override IEdmTypeReference GetReturnType(IEnumerable functionImportGroup)
{
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.EdmTypeWriterResolver_GetReturnTypeForOperationImportGroup));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.EdmTypeWriterResolver_GetReturnTypeForOperationImportGroup));
}
///
diff --git a/src/Microsoft.OData.Core/Metadata/MetadataUtils.cs b/src/Microsoft.OData.Core/Metadata/MetadataUtils.cs
index e73b95eec9..6cde76006c 100644
--- a/src/Microsoft.OData.Core/Metadata/MetadataUtils.cs
+++ b/src/Microsoft.OData.Core/Metadata/MetadataUtils.cs
@@ -8,6 +8,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
@@ -112,7 +113,7 @@ internal static IEdmType ResolveTypeName(
if (resolvedType == null)
{
// If a type resolver is specified it must never return null.
- throw new ODataException(Strings.MetadataUtils_ResolveTypeName(typeName));
+ throw new ODataException(Error.Format(SRResources.MetadataUtils_ResolveTypeName, typeName));
}
}
else
@@ -168,7 +169,7 @@ internal static IList CalculateBindableOperationsForType(IEdmType
throw;
}
- throw new ODataException(Strings.MetadataUtils_CalculateBindableOperationsForType(bindingType.FullTypeName()), exc);
+ throw new ODataException(Error.Format(SRResources.MetadataUtils_CalculateBindableOperationsForType, bindingType.FullTypeName()), exc);
}
IList operationsFound = operations as IList;
diff --git a/src/Microsoft.OData.Core/Metadata/ODataXmlErrorDeserializer.cs b/src/Microsoft.OData.Core/Metadata/ODataXmlErrorDeserializer.cs
index fd67a9e45c..2da99e7143 100644
--- a/src/Microsoft.OData.Core/Metadata/ODataXmlErrorDeserializer.cs
+++ b/src/Microsoft.OData.Core/Metadata/ODataXmlErrorDeserializer.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Metadata
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Diagnostics;
@@ -161,7 +162,7 @@ private static void VerifyErrorElementNotFound(
if ((elementsFoundBitField & elementFoundBitMask) == elementFoundBitMask)
{
- throw new ODataException(Strings.ODataXmlErrorDeserializer_MultipleErrorElementsWithSameName(elementName));
+ throw new ODataException(Error.Format(SRResources.ODataXmlErrorDeserializer_MultipleErrorElementsWithSameName, elementName));
}
elementsFoundBitField |= elementFoundBitMask;
@@ -185,7 +186,7 @@ private static void VerifyInnerErrorElementNotFound(
if ((elementsFoundBitField & elementFoundBitMask) == elementFoundBitMask)
{
- throw new ODataException(Strings.ODataXmlErrorDeserializer_MultipleInnerErrorElementsWithSameName(elementName));
+ throw new ODataException(Error.Format(SRResources.ODataXmlErrorDeserializer_MultipleInnerErrorElementsWithSameName, elementName));
}
elementsFoundBitField |= elementFoundBitMask;
diff --git a/src/Microsoft.OData.Core/Metadata/XmlReaderExtensions.cs b/src/Microsoft.OData.Core/Metadata/XmlReaderExtensions.cs
index c499342b97..50e43ec6ec 100644
--- a/src/Microsoft.OData.Core/Metadata/XmlReaderExtensions.cs
+++ b/src/Microsoft.OData.Core/Metadata/XmlReaderExtensions.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.Metadata
{
+ using Microsoft.OData.Core;
#region Namespaces
using System.Diagnostics;
using System.Text;
@@ -110,7 +111,7 @@ internal static string ReadElementContentValue(this XmlReader reader)
break;
default:
- throw new ODataException(Strings.XmlReaderExtension_InvalidNodeInStringValue(reader.NodeType));
+ throw new ODataException(Error.Format(SRResources.XmlReaderExtension_InvalidNodeInStringValue, reader.NodeType));
}
}
diff --git a/src/Microsoft.OData.Core/Microsoft.OData.Core.cs b/src/Microsoft.OData.Core/Microsoft.OData.Core.cs
deleted file mode 100644
index 92e3fbceb3..0000000000
--- a/src/Microsoft.OData.Core/Microsoft.OData.Core.cs
+++ /dev/null
@@ -1,936 +0,0 @@
-//
-
-//---------------------------------------------------------------------
-//
-// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
-//
-// GENERATED FILE. DO NOT MODIFY.
-//
-//
-//---------------------------------------------------------------------
-
-using System;
-using System.Globalization;
-using System.Reflection;
-using System.Resources;
-using System.Threading;
-
-namespace Microsoft.OData
-{
- ///
- /// AutoGenerated resource class. Usage:
- ///
- /// string s = TextRes.GetString(TextRes.MyIdentifier);
- ///
- internal sealed class TextRes {
- internal const string ExceptionUtils_ArgumentStringEmpty = "ExceptionUtils_ArgumentStringEmpty";
- internal const string ODataRequestMessage_AsyncNotAvailable = "ODataRequestMessage_AsyncNotAvailable";
- internal const string ODataRequestMessage_StreamTaskIsNull = "ODataRequestMessage_StreamTaskIsNull";
- internal const string ODataRequestMessage_MessageStreamIsNull = "ODataRequestMessage_MessageStreamIsNull";
- internal const string ODataResponseMessage_AsyncNotAvailable = "ODataResponseMessage_AsyncNotAvailable";
- internal const string ODataResponseMessage_StreamTaskIsNull = "ODataResponseMessage_StreamTaskIsNull";
- internal const string ODataResponseMessage_MessageStreamIsNull = "ODataResponseMessage_MessageStreamIsNull";
- internal const string AsyncBufferedStream_WriterDisposedWithoutFlush = "AsyncBufferedStream_WriterDisposedWithoutFlush";
- internal const string ODataOutputContext_UnsupportedPayloadKindForFormat = "ODataOutputContext_UnsupportedPayloadKindForFormat";
- internal const string ODataInputContext_UnsupportedPayloadKindForFormat = "ODataInputContext_UnsupportedPayloadKindForFormat";
- internal const string ODataOutputContext_MetadataDocumentUriMissing = "ODataOutputContext_MetadataDocumentUriMissing";
- internal const string ODataJsonSerializer_RelativeUriUsedWithoutMetadataDocumentUriOrMetadata = "ODataJsonSerializer_RelativeUriUsedWithoutMetadataDocumentUriOrMetadata";
- internal const string ODataWriter_RelativeUriUsedWithoutBaseUriSpecified = "ODataWriter_RelativeUriUsedWithoutBaseUriSpecified";
- internal const string ODataWriter_StreamPropertiesMustBePropertiesOfODataResource = "ODataWriter_StreamPropertiesMustBePropertiesOfODataResource";
- internal const string ODataWriterCore_InvalidStateTransition = "ODataWriterCore_InvalidStateTransition";
- internal const string ODataWriterCore_InvalidTransitionFromStart = "ODataWriterCore_InvalidTransitionFromStart";
- internal const string ODataWriterCore_InvalidTransitionFromResource = "ODataWriterCore_InvalidTransitionFromResource";
- internal const string ODataWriterCore_InvalidTransitionFrom40DeletedResource = "ODataWriterCore_InvalidTransitionFrom40DeletedResource";
- internal const string ODataWriterCore_InvalidTransitionFromNullResource = "ODataWriterCore_InvalidTransitionFromNullResource";
- internal const string ODataWriterCore_InvalidTransitionFromResourceSet = "ODataWriterCore_InvalidTransitionFromResourceSet";
- internal const string ODataWriterCore_InvalidTransitionFromExpandedLink = "ODataWriterCore_InvalidTransitionFromExpandedLink";
- internal const string ODataWriterCore_InvalidTransitionFromCompleted = "ODataWriterCore_InvalidTransitionFromCompleted";
- internal const string ODataWriterCore_InvalidTransitionFromError = "ODataWriterCore_InvalidTransitionFromError";
- internal const string ODataJsonDeltaWriter_InvalidTransitionFromNestedResource = "ODataJsonDeltaWriter_InvalidTransitionFromNestedResource";
- internal const string ODataJsonDeltaWriter_InvalidTransitionToNestedResource = "ODataJsonDeltaWriter_InvalidTransitionToNestedResource";
- internal const string ODataJsonDeltaWriter_WriteStartExpandedResourceSetCalledInInvalidState = "ODataJsonDeltaWriter_WriteStartExpandedResourceSetCalledInInvalidState";
- internal const string ODataWriterCore_WriteEndCalledInInvalidState = "ODataWriterCore_WriteEndCalledInInvalidState";
- internal const string ODataWriterCore_StreamNotDisposed = "ODataWriterCore_StreamNotDisposed";
- internal const string ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties = "ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties";
- internal const string ODataWriterCore_QueryCountInRequest = "ODataWriterCore_QueryCountInRequest";
- internal const string ODataWriterCore_QueryNextLinkInRequest = "ODataWriterCore_QueryNextLinkInRequest";
- internal const string ODataWriterCore_QueryDeltaLinkInRequest = "ODataWriterCore_QueryDeltaLinkInRequest";
- internal const string ODataWriterCore_CannotWriteDeltaWithResourceSetWriter = "ODataWriterCore_CannotWriteDeltaWithResourceSetWriter";
- internal const string ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry = "ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry";
- internal const string ODataWriterCore_CannotWriteTopLevelResourceSetWithResourceWriter = "ODataWriterCore_CannotWriteTopLevelResourceSetWithResourceWriter";
- internal const string ODataWriterCore_CannotWriteTopLevelResourceWithResourceSetWriter = "ODataWriterCore_CannotWriteTopLevelResourceWithResourceSetWriter";
- internal const string ODataWriterCore_SyncCallOnAsyncWriter = "ODataWriterCore_SyncCallOnAsyncWriter";
- internal const string ODataWriterCore_AsyncCallOnSyncWriter = "ODataWriterCore_AsyncCallOnSyncWriter";
- internal const string ODataWriterCore_EntityReferenceLinkWithoutNavigationLink = "ODataWriterCore_EntityReferenceLinkWithoutNavigationLink";
- internal const string ODataWriterCore_DeferredLinkInRequest = "ODataWriterCore_DeferredLinkInRequest";
- internal const string ODataWriterCore_MultipleItemsInNestedResourceInfoWithContent = "ODataWriterCore_MultipleItemsInNestedResourceInfoWithContent";
- internal const string ODataWriterCore_DeltaLinkNotSupportedOnExpandedResourceSet = "ODataWriterCore_DeltaLinkNotSupportedOnExpandedResourceSet";
- internal const string ODataWriterCore_PathInODataUriMustBeSetWhenWritingContainedElement = "ODataWriterCore_PathInODataUriMustBeSetWhenWritingContainedElement";
- internal const string DuplicatePropertyNamesNotAllowed = "DuplicatePropertyNamesNotAllowed";
- internal const string DuplicateAnnotationNotAllowed = "DuplicateAnnotationNotAllowed";
- internal const string DuplicateAnnotationForPropertyNotAllowed = "DuplicateAnnotationForPropertyNotAllowed";
- internal const string DuplicateAnnotationForInstanceAnnotationNotAllowed = "DuplicateAnnotationForInstanceAnnotationNotAllowed";
- internal const string PropertyAnnotationAfterTheProperty = "PropertyAnnotationAfterTheProperty";
- internal const string ValueUtils_CannotConvertValueToPrimitive = "ValueUtils_CannotConvertValueToPrimitive";
- internal const string ODataJsonWriter_UnsupportedValueType = "ODataJsonWriter_UnsupportedValueType";
- internal const string ODataJsonWriter_UnsupportedValueInCollection = "ODataJsonWriter_UnsupportedValueInCollection";
- internal const string ODataJsonWriter_UnsupportedDateTimeFormat = "ODataJsonWriter_UnsupportedDateTimeFormat";
- internal const string ODataException_GeneralError = "ODataException_GeneralError";
- internal const string ODataErrorException_GeneralError = "ODataErrorException_GeneralError";
- internal const string ODataUriParserException_GeneralError = "ODataUriParserException_GeneralError";
- internal const string ODataUrlValidationError_SelectRequired = "ODataUrlValidationError_SelectRequired";
- internal const string ODataUrlValidationError_InvalidRule = "ODataUrlValidationError_InvalidRule";
- internal const string ODataMessageWriter_WriterAlreadyUsed = "ODataMessageWriter_WriterAlreadyUsed";
- internal const string ODataMessageWriter_EntityReferenceLinksInRequestNotAllowed = "ODataMessageWriter_EntityReferenceLinksInRequestNotAllowed";
- internal const string ODataMessageWriter_ErrorPayloadInRequest = "ODataMessageWriter_ErrorPayloadInRequest";
- internal const string ODataMessageWriter_ServiceDocumentInRequest = "ODataMessageWriter_ServiceDocumentInRequest";
- internal const string ODataMessageWriter_MetadataDocumentInRequest = "ODataMessageWriter_MetadataDocumentInRequest";
- internal const string ODataMessageWriter_DeltaInRequest = "ODataMessageWriter_DeltaInRequest";
- internal const string ODataMessageWriter_AsyncInRequest = "ODataMessageWriter_AsyncInRequest";
- internal const string ODataMessageWriter_CannotWriteTopLevelNull = "ODataMessageWriter_CannotWriteTopLevelNull";
- internal const string ODataMessageWriter_CannotWriteNullInRawFormat = "ODataMessageWriter_CannotWriteNullInRawFormat";
- internal const string ODataMessageWriter_CannotSetHeadersWithInvalidPayloadKind = "ODataMessageWriter_CannotSetHeadersWithInvalidPayloadKind";
- internal const string ODataMessageWriter_IncompatiblePayloadKinds = "ODataMessageWriter_IncompatiblePayloadKinds";
- internal const string ODataMessageWriter_CannotWriteStreamPropertyAsTopLevelProperty = "ODataMessageWriter_CannotWriteStreamPropertyAsTopLevelProperty";
- internal const string ODataMessageWriter_WriteErrorAlreadyCalled = "ODataMessageWriter_WriteErrorAlreadyCalled";
- internal const string ODataMessageWriter_CannotWriteInStreamErrorForRawValues = "ODataMessageWriter_CannotWriteInStreamErrorForRawValues";
- internal const string ODataMessageWriter_CannotWriteMetadataWithoutModel = "ODataMessageWriter_CannotWriteMetadataWithoutModel";
- internal const string ODataMessageWriter_CannotSpecifyOperationWithoutModel = "ODataMessageWriter_CannotSpecifyOperationWithoutModel";
- internal const string ODataMessageWriter_JsonPaddingOnInvalidContentType = "ODataMessageWriter_JsonPaddingOnInvalidContentType";
- internal const string ODataMessageWriter_NonCollectionType = "ODataMessageWriter_NonCollectionType";
- internal const string ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue = "ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue";
- internal const string ODataMessageWriter_JsonWriterFactory_ReturnedNull = "ODataMessageWriter_JsonWriterFactory_ReturnedNull";
- internal const string ODataMessageWriter_Buffer_Maximum_Size_Exceeded = "ODataMessageWriter_Buffer_Maximum_Size_Exceeded";
- internal const string ODataMessageWriterSettings_MessageWriterSettingsXmlCustomizationCallbacksMustBeSpecifiedBoth = "ODataMessageWriterSettings_MessageWriterSettingsXmlCustomizationCallbacksMustBeSpecifiedBoth";
- internal const string ODataCollectionWriterCore_InvalidTransitionFromStart = "ODataCollectionWriterCore_InvalidTransitionFromStart";
- internal const string ODataCollectionWriterCore_InvalidTransitionFromCollection = "ODataCollectionWriterCore_InvalidTransitionFromCollection";
- internal const string ODataCollectionWriterCore_InvalidTransitionFromItem = "ODataCollectionWriterCore_InvalidTransitionFromItem";
- internal const string ODataCollectionWriterCore_WriteEndCalledInInvalidState = "ODataCollectionWriterCore_WriteEndCalledInInvalidState";
- internal const string ODataCollectionWriterCore_SyncCallOnAsyncWriter = "ODataCollectionWriterCore_SyncCallOnAsyncWriter";
- internal const string ODataCollectionWriterCore_AsyncCallOnSyncWriter = "ODataCollectionWriterCore_AsyncCallOnSyncWriter";
- internal const string ODataBatch_InvalidHttpMethodForChangeSetRequest = "ODataBatch_InvalidHttpMethodForChangeSetRequest";
- internal const string ODataBatchOperationHeaderDictionary_KeyNotFound = "ODataBatchOperationHeaderDictionary_KeyNotFound";
- internal const string ODataBatchOperationHeaderDictionary_DuplicateCaseInsensitiveKeys = "ODataBatchOperationHeaderDictionary_DuplicateCaseInsensitiveKeys";
- internal const string ODataParameterWriter_InStreamErrorNotSupported = "ODataParameterWriter_InStreamErrorNotSupported";
- internal const string ODataParameterWriter_CannotCreateParameterWriterOnResponseMessage = "ODataParameterWriter_CannotCreateParameterWriterOnResponseMessage";
- internal const string ODataParameterWriterCore_SyncCallOnAsyncWriter = "ODataParameterWriterCore_SyncCallOnAsyncWriter";
- internal const string ODataParameterWriterCore_AsyncCallOnSyncWriter = "ODataParameterWriterCore_AsyncCallOnSyncWriter";
- internal const string ODataParameterWriterCore_CannotWriteStart = "ODataParameterWriterCore_CannotWriteStart";
- internal const string ODataParameterWriterCore_CannotWriteParameter = "ODataParameterWriterCore_CannotWriteParameter";
- internal const string ODataParameterWriterCore_CannotWriteEnd = "ODataParameterWriterCore_CannotWriteEnd";
- internal const string ODataParameterWriterCore_CannotWriteInErrorOrCompletedState = "ODataParameterWriterCore_CannotWriteInErrorOrCompletedState";
- internal const string ODataParameterWriterCore_DuplicatedParameterNameNotAllowed = "ODataParameterWriterCore_DuplicatedParameterNameNotAllowed";
- internal const string ODataParameterWriterCore_CannotWriteValueOnNonValueTypeKind = "ODataParameterWriterCore_CannotWriteValueOnNonValueTypeKind";
- internal const string ODataParameterWriterCore_CannotWriteValueOnNonSupportedValueType = "ODataParameterWriterCore_CannotWriteValueOnNonSupportedValueType";
- internal const string ODataParameterWriterCore_CannotCreateCollectionWriterOnNonCollectionTypeKind = "ODataParameterWriterCore_CannotCreateCollectionWriterOnNonCollectionTypeKind";
- internal const string ODataParameterWriterCore_CannotCreateResourceWriterOnNonEntityOrComplexTypeKind = "ODataParameterWriterCore_CannotCreateResourceWriterOnNonEntityOrComplexTypeKind";
- internal const string ODataParameterWriterCore_CannotCreateResourceSetWriterOnNonStructuredCollectionTypeKind = "ODataParameterWriterCore_CannotCreateResourceSetWriterOnNonStructuredCollectionTypeKind";
- internal const string ODataParameterWriterCore_ParameterNameNotFoundInOperation = "ODataParameterWriterCore_ParameterNameNotFoundInOperation";
- internal const string ODataParameterWriterCore_MissingParameterInParameterPayload = "ODataParameterWriterCore_MissingParameterInParameterPayload";
- internal const string ODataBatchWriter_FlushOrFlushAsyncCalledInStreamRequestedState = "ODataBatchWriter_FlushOrFlushAsyncCalledInStreamRequestedState";
- internal const string ODataBatchWriter_CannotCompleteBatchWithActiveChangeSet = "ODataBatchWriter_CannotCompleteBatchWithActiveChangeSet";
- internal const string ODataBatchWriter_CannotStartChangeSetWithActiveChangeSet = "ODataBatchWriter_CannotStartChangeSetWithActiveChangeSet";
- internal const string ODataBatchWriter_CannotCompleteChangeSetWithoutActiveChangeSet = "ODataBatchWriter_CannotCompleteChangeSetWithoutActiveChangeSet";
- internal const string ODataBatchWriter_InvalidTransitionFromStart = "ODataBatchWriter_InvalidTransitionFromStart";
- internal const string ODataBatchWriter_InvalidTransitionFromBatchStarted = "ODataBatchWriter_InvalidTransitionFromBatchStarted";
- internal const string ODataBatchWriter_InvalidTransitionFromChangeSetStarted = "ODataBatchWriter_InvalidTransitionFromChangeSetStarted";
- internal const string ODataBatchWriter_InvalidTransitionFromOperationCreated = "ODataBatchWriter_InvalidTransitionFromOperationCreated";
- internal const string ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested = "ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested";
- internal const string ODataBatchWriter_InvalidTransitionFromOperationContentStreamDisposed = "ODataBatchWriter_InvalidTransitionFromOperationContentStreamDisposed";
- internal const string ODataBatchWriter_InvalidTransitionFromChangeSetCompleted = "ODataBatchWriter_InvalidTransitionFromChangeSetCompleted";
- internal const string ODataBatchWriter_InvalidTransitionFromBatchCompleted = "ODataBatchWriter_InvalidTransitionFromBatchCompleted";
- internal const string ODataBatchWriter_CannotCreateRequestOperationWhenWritingResponse = "ODataBatchWriter_CannotCreateRequestOperationWhenWritingResponse";
- internal const string ODataBatchWriter_CannotCreateResponseOperationWhenWritingRequest = "ODataBatchWriter_CannotCreateResponseOperationWhenWritingRequest";
- internal const string ODataBatchWriter_MaxBatchSizeExceeded = "ODataBatchWriter_MaxBatchSizeExceeded";
- internal const string ODataBatchWriter_MaxChangeSetSizeExceeded = "ODataBatchWriter_MaxChangeSetSizeExceeded";
- internal const string ODataBatchWriter_SyncCallOnAsyncWriter = "ODataBatchWriter_SyncCallOnAsyncWriter";
- internal const string ODataBatchWriter_AsyncCallOnSyncWriter = "ODataBatchWriter_AsyncCallOnSyncWriter";
- internal const string ODataBatchWriter_DuplicateContentIDsNotAllowed = "ODataBatchWriter_DuplicateContentIDsNotAllowed";
- internal const string ODataBatchWriter_CannotWriteInStreamErrorForBatch = "ODataBatchWriter_CannotWriteInStreamErrorForBatch";
- internal const string ODataBatchUtils_RelativeUriUsedWithoutBaseUriSpecified = "ODataBatchUtils_RelativeUriUsedWithoutBaseUriSpecified";
- internal const string ODataBatchUtils_RelativeUriStartingWithDollarUsedWithoutBaseUriSpecified = "ODataBatchUtils_RelativeUriStartingWithDollarUsedWithoutBaseUriSpecified";
- internal const string ODataBatchOperationMessage_VerifyNotCompleted = "ODataBatchOperationMessage_VerifyNotCompleted";
- internal const string ODataBatchOperationStream_Disposed = "ODataBatchOperationStream_Disposed";
- internal const string ODataBatchReader_CannotCreateRequestOperationWhenReadingResponse = "ODataBatchReader_CannotCreateRequestOperationWhenReadingResponse";
- internal const string ODataBatchReader_CannotCreateResponseOperationWhenReadingRequest = "ODataBatchReader_CannotCreateResponseOperationWhenReadingRequest";
- internal const string ODataBatchReader_InvalidStateForCreateOperationRequestMessage = "ODataBatchReader_InvalidStateForCreateOperationRequestMessage";
- internal const string ODataBatchReader_OperationRequestMessageAlreadyCreated = "ODataBatchReader_OperationRequestMessageAlreadyCreated";
- internal const string ODataBatchReader_OperationResponseMessageAlreadyCreated = "ODataBatchReader_OperationResponseMessageAlreadyCreated";
- internal const string ODataBatchReader_InvalidStateForCreateOperationResponseMessage = "ODataBatchReader_InvalidStateForCreateOperationResponseMessage";
- internal const string ODataBatchReader_CannotUseReaderWhileOperationStreamActive = "ODataBatchReader_CannotUseReaderWhileOperationStreamActive";
- internal const string ODataBatchReader_SyncCallOnAsyncReader = "ODataBatchReader_SyncCallOnAsyncReader";
- internal const string ODataBatchReader_AsyncCallOnSyncReader = "ODataBatchReader_AsyncCallOnSyncReader";
- internal const string ODataBatchReader_ReadOrReadAsyncCalledInInvalidState = "ODataBatchReader_ReadOrReadAsyncCalledInInvalidState";
- internal const string ODataBatchReader_MaxBatchSizeExceeded = "ODataBatchReader_MaxBatchSizeExceeded";
- internal const string ODataBatchReader_MaxChangeSetSizeExceeded = "ODataBatchReader_MaxChangeSetSizeExceeded";
- internal const string ODataBatchReader_NoMessageWasCreatedForOperation = "ODataBatchReader_NoMessageWasCreatedForOperation";
- internal const string ODataBatchReader_ReaderModeNotInitilized = "ODataBatchReader_ReaderModeNotInitilized";
- internal const string ODataBatchReader_JsonBatchTopLevelPropertyMissing = "ODataBatchReader_JsonBatchTopLevelPropertyMissing";
- internal const string ODataBatchReader_DuplicateContentIDsNotAllowed = "ODataBatchReader_DuplicateContentIDsNotAllowed";
- internal const string ODataBatchReader_DuplicateAtomicityGroupIDsNotAllowed = "ODataBatchReader_DuplicateAtomicityGroupIDsNotAllowed";
- internal const string ODataBatchReader_RequestPropertyMissing = "ODataBatchReader_RequestPropertyMissing";
- internal const string ODataBatchReader_SameRequestIdAsAtomicityGroupIdNotAllowed = "ODataBatchReader_SameRequestIdAsAtomicityGroupIdNotAllowed";
- internal const string ODataBatchReader_SelfReferenceDependsOnRequestIdNotAllowed = "ODataBatchReader_SelfReferenceDependsOnRequestIdNotAllowed";
- internal const string ODataBatchReader_DependsOnRequestIdIsPartOfAtomicityGroupNotAllowed = "ODataBatchReader_DependsOnRequestIdIsPartOfAtomicityGroupNotAllowed";
- internal const string ODataBatchReader_DependsOnIdNotFound = "ODataBatchReader_DependsOnIdNotFound";
- internal const string ODataBatchReader_AbsoluteURINotMatchingBaseUri = "ODataBatchReader_AbsoluteURINotMatchingBaseUri";
- internal const string ODataBatchReader_ReferenceIdNotIncludedInDependsOn = "ODataBatchReader_ReferenceIdNotIncludedInDependsOn";
- internal const string ODataBatch_GroupIdOrChangeSetIdCannotBeNull = "ODataBatch_GroupIdOrChangeSetIdCannotBeNull";
- internal const string ODataBatchReader_MessageIdPositionedIncorrectly = "ODataBatchReader_MessageIdPositionedIncorrectly";
- internal const string ODataBatchReader_ReaderStreamChangesetBoundaryCannotBeNull = "ODataBatchReader_ReaderStreamChangesetBoundaryCannotBeNull";
- internal const string ODataBatchReaderStream_InvalidHeaderSpecified = "ODataBatchReaderStream_InvalidHeaderSpecified";
- internal const string ODataBatchReaderStream_InvalidRequestLine = "ODataBatchReaderStream_InvalidRequestLine";
- internal const string ODataBatchReaderStream_InvalidResponseLine = "ODataBatchReaderStream_InvalidResponseLine";
- internal const string ODataBatchReaderStream_InvalidHttpVersionSpecified = "ODataBatchReaderStream_InvalidHttpVersionSpecified";
- internal const string ODataBatchReaderStream_NonIntegerHttpStatusCode = "ODataBatchReaderStream_NonIntegerHttpStatusCode";
- internal const string ODataBatchReaderStream_MissingContentTypeHeader = "ODataBatchReaderStream_MissingContentTypeHeader";
- internal const string ODataBatchReaderStream_MissingOrInvalidContentEncodingHeader = "ODataBatchReaderStream_MissingOrInvalidContentEncodingHeader";
- internal const string ODataBatchReaderStream_InvalidContentTypeSpecified = "ODataBatchReaderStream_InvalidContentTypeSpecified";
- internal const string ODataBatchReaderStream_InvalidContentLengthSpecified = "ODataBatchReaderStream_InvalidContentLengthSpecified";
- internal const string ODataBatchReaderStream_DuplicateHeaderFound = "ODataBatchReaderStream_DuplicateHeaderFound";
- internal const string ODataBatchReaderStream_NestedChangesetsAreNotSupported = "ODataBatchReaderStream_NestedChangesetsAreNotSupported";
- internal const string ODataBatchReaderStream_MultiByteEncodingsNotSupported = "ODataBatchReaderStream_MultiByteEncodingsNotSupported";
- internal const string ODataBatchReaderStream_UnexpectedEndOfInput = "ODataBatchReaderStream_UnexpectedEndOfInput";
- internal const string ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached = "ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached";
- internal const string ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch = "ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch";
- internal const string ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch = "ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch";
- internal const string ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch = "ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch";
- internal const string ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType = "ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType";
- internal const string ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader = "ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader";
- internal const string ODataAsyncWriter_CannotCreateResponseWhenNotWritingResponse = "ODataAsyncWriter_CannotCreateResponseWhenNotWritingResponse";
- internal const string ODataAsyncWriter_CannotCreateResponseMoreThanOnce = "ODataAsyncWriter_CannotCreateResponseMoreThanOnce";
- internal const string ODataAsyncWriter_SyncCallOnAsyncWriter = "ODataAsyncWriter_SyncCallOnAsyncWriter";
- internal const string ODataAsyncWriter_AsyncCallOnSyncWriter = "ODataAsyncWriter_AsyncCallOnSyncWriter";
- internal const string ODataAsyncWriter_CannotWriteInStreamErrorForAsync = "ODataAsyncWriter_CannotWriteInStreamErrorForAsync";
- internal const string ODataAsyncReader_InvalidHeaderSpecified = "ODataAsyncReader_InvalidHeaderSpecified";
- internal const string ODataAsyncReader_CannotCreateResponseWhenNotReadingResponse = "ODataAsyncReader_CannotCreateResponseWhenNotReadingResponse";
- internal const string ODataAsyncReader_InvalidResponseLine = "ODataAsyncReader_InvalidResponseLine";
- internal const string ODataAsyncReader_InvalidHttpVersionSpecified = "ODataAsyncReader_InvalidHttpVersionSpecified";
- internal const string ODataAsyncReader_NonIntegerHttpStatusCode = "ODataAsyncReader_NonIntegerHttpStatusCode";
- internal const string ODataAsyncReader_DuplicateHeaderFound = "ODataAsyncReader_DuplicateHeaderFound";
- internal const string ODataAsyncReader_MultiByteEncodingsNotSupported = "ODataAsyncReader_MultiByteEncodingsNotSupported";
- internal const string ODataAsyncReader_InvalidNewLineEncountered = "ODataAsyncReader_InvalidNewLineEncountered";
- internal const string ODataAsyncReader_UnexpectedEndOfInput = "ODataAsyncReader_UnexpectedEndOfInput";
- internal const string ODataAsyncReader_SyncCallOnAsyncReader = "ODataAsyncReader_SyncCallOnAsyncReader";
- internal const string ODataAsyncReader_AsyncCallOnSyncReader = "ODataAsyncReader_AsyncCallOnSyncReader";
- internal const string HttpUtils_MediaTypeUnspecified = "HttpUtils_MediaTypeUnspecified";
- internal const string HttpUtils_MediaTypeRequiresSlash = "HttpUtils_MediaTypeRequiresSlash";
- internal const string HttpUtils_MediaTypeRequiresSubType = "HttpUtils_MediaTypeRequiresSubType";
- internal const string HttpUtils_MediaTypeMissingParameterValue = "HttpUtils_MediaTypeMissingParameterValue";
- internal const string HttpUtils_MediaTypeMissingParameterName = "HttpUtils_MediaTypeMissingParameterName";
- internal const string HttpUtils_EscapeCharWithoutQuotes = "HttpUtils_EscapeCharWithoutQuotes";
- internal const string HttpUtils_EscapeCharAtEnd = "HttpUtils_EscapeCharAtEnd";
- internal const string HttpUtils_ClosingQuoteNotFound = "HttpUtils_ClosingQuoteNotFound";
- internal const string HttpUtils_InvalidCharacterInQuotedParameterValue = "HttpUtils_InvalidCharacterInQuotedParameterValue";
- internal const string HttpUtils_ContentTypeMissing = "HttpUtils_ContentTypeMissing";
- internal const string HttpUtils_MediaTypeRequiresSemicolonBeforeParameter = "HttpUtils_MediaTypeRequiresSemicolonBeforeParameter";
- internal const string HttpUtils_InvalidQualityValueStartChar = "HttpUtils_InvalidQualityValueStartChar";
- internal const string HttpUtils_InvalidQualityValue = "HttpUtils_InvalidQualityValue";
- internal const string HttpUtils_CannotConvertCharToInt = "HttpUtils_CannotConvertCharToInt";
- internal const string HttpUtils_MissingSeparatorBetweenCharsets = "HttpUtils_MissingSeparatorBetweenCharsets";
- internal const string HttpUtils_InvalidSeparatorBetweenCharsets = "HttpUtils_InvalidSeparatorBetweenCharsets";
- internal const string HttpUtils_InvalidCharsetName = "HttpUtils_InvalidCharsetName";
- internal const string HttpUtils_UnexpectedEndOfQValue = "HttpUtils_UnexpectedEndOfQValue";
- internal const string HttpUtils_ExpectedLiteralNotFoundInString = "HttpUtils_ExpectedLiteralNotFoundInString";
- internal const string HttpUtils_InvalidHttpMethodString = "HttpUtils_InvalidHttpMethodString";
- internal const string HttpUtils_NoOrMoreThanOneContentTypeSpecified = "HttpUtils_NoOrMoreThanOneContentTypeSpecified";
- internal const string HttpHeaderValueLexer_UnrecognizedSeparator = "HttpHeaderValueLexer_UnrecognizedSeparator";
- internal const string HttpHeaderValueLexer_TokenExpectedButFoundQuotedString = "HttpHeaderValueLexer_TokenExpectedButFoundQuotedString";
- internal const string HttpHeaderValueLexer_FailedToReadTokenOrQuotedString = "HttpHeaderValueLexer_FailedToReadTokenOrQuotedString";
- internal const string HttpHeaderValueLexer_InvalidSeparatorAfterQuotedString = "HttpHeaderValueLexer_InvalidSeparatorAfterQuotedString";
- internal const string HttpHeaderValueLexer_EndOfFileAfterSeparator = "HttpHeaderValueLexer_EndOfFileAfterSeparator";
- internal const string MediaType_EncodingNotSupported = "MediaType_EncodingNotSupported";
- internal const string MediaTypeUtils_DidNotFindMatchingMediaType = "MediaTypeUtils_DidNotFindMatchingMediaType";
- internal const string MediaTypeUtils_CannotDetermineFormatFromContentType = "MediaTypeUtils_CannotDetermineFormatFromContentType";
- internal const string MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified = "MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified";
- internal const string MediaTypeUtils_BoundaryMustBeSpecifiedForBatchPayloads = "MediaTypeUtils_BoundaryMustBeSpecifiedForBatchPayloads";
- internal const string ExpressionLexer_ExpectedLiteralToken = "ExpressionLexer_ExpectedLiteralToken";
- internal const string ODataUriUtils_ConvertToUriLiteralUnsupportedType = "ODataUriUtils_ConvertToUriLiteralUnsupportedType";
- internal const string ODataUriUtils_ConvertFromUriLiteralTypeRefWithoutModel = "ODataUriUtils_ConvertFromUriLiteralTypeRefWithoutModel";
- internal const string ODataUriUtils_ConvertFromUriLiteralOverflowNumber = "ODataUriUtils_ConvertFromUriLiteralOverflowNumber";
- internal const string ODataUriUtils_ConvertFromUriLiteralTypeVerificationFailure = "ODataUriUtils_ConvertFromUriLiteralTypeVerificationFailure";
- internal const string ODataUriUtils_ConvertFromUriLiteralNullTypeVerificationFailure = "ODataUriUtils_ConvertFromUriLiteralNullTypeVerificationFailure";
- internal const string ODataUriUtils_ConvertFromUriLiteralNullOnNonNullableType = "ODataUriUtils_ConvertFromUriLiteralNullOnNonNullableType";
- internal const string ODataUtils_CannotConvertValueToRawString = "ODataUtils_CannotConvertValueToRawString";
- internal const string ODataUtils_DidNotFindDefaultMediaType = "ODataUtils_DidNotFindDefaultMediaType";
- internal const string ODataUtils_UnsupportedVersionHeader = "ODataUtils_UnsupportedVersionHeader";
- internal const string ODataUtils_MaxProtocolVersionExceeded = "ODataUtils_MaxProtocolVersionExceeded";
- internal const string ODataUtils_UnsupportedVersionNumber = "ODataUtils_UnsupportedVersionNumber";
- internal const string ODataUtils_ModelDoesNotHaveContainer = "ODataUtils_ModelDoesNotHaveContainer";
- internal const string ReaderUtils_EnumerableModified = "ReaderUtils_EnumerableModified";
- internal const string ReaderValidationUtils_NullValueForNonNullableType = "ReaderValidationUtils_NullValueForNonNullableType";
- internal const string ReaderValidationUtils_NullValueForNullableType = "ReaderValidationUtils_NullValueForNullableType";
- internal const string ReaderValidationUtils_NullNamedValueForNonNullableType = "ReaderValidationUtils_NullNamedValueForNonNullableType";
- internal const string ReaderValidationUtils_NullNamedValueForNullableType = "ReaderValidationUtils_NullNamedValueForNullableType";
- internal const string ReaderValidationUtils_EntityReferenceLinkMissingUri = "ReaderValidationUtils_EntityReferenceLinkMissingUri";
- internal const string ReaderValidationUtils_ValueWithoutType = "ReaderValidationUtils_ValueWithoutType";
- internal const string ReaderValidationUtils_ResourceWithoutType = "ReaderValidationUtils_ResourceWithoutType";
- internal const string ReaderValidationUtils_CannotConvertPrimitiveValue = "ReaderValidationUtils_CannotConvertPrimitiveValue";
- internal const string ReaderValidationUtils_MessageReaderSettingsBaseUriMustBeNullOrAbsolute = "ReaderValidationUtils_MessageReaderSettingsBaseUriMustBeNullOrAbsolute";
- internal const string ReaderValidationUtils_UndeclaredPropertyBehaviorKindSpecifiedOnRequest = "ReaderValidationUtils_UndeclaredPropertyBehaviorKindSpecifiedOnRequest";
- internal const string ReaderValidationUtils_ContextUriValidationInvalidExpectedEntitySet = "ReaderValidationUtils_ContextUriValidationInvalidExpectedEntitySet";
- internal const string ReaderValidationUtils_ContextUriValidationInvalidExpectedEntityType = "ReaderValidationUtils_ContextUriValidationInvalidExpectedEntityType";
- internal const string ReaderValidationUtils_ContextUriValidationNonMatchingPropertyNames = "ReaderValidationUtils_ContextUriValidationNonMatchingPropertyNames";
- internal const string ReaderValidationUtils_ContextUriValidationNonMatchingDeclaringTypes = "ReaderValidationUtils_ContextUriValidationNonMatchingDeclaringTypes";
- internal const string ReaderValidationUtils_NonMatchingPropertyNames = "ReaderValidationUtils_NonMatchingPropertyNames";
- internal const string ReaderValidationUtils_TypeInContextUriDoesNotMatchExpectedType = "ReaderValidationUtils_TypeInContextUriDoesNotMatchExpectedType";
- internal const string ReaderValidationUtils_ContextUriDoesNotReferTypeAssignableToExpectedType = "ReaderValidationUtils_ContextUriDoesNotReferTypeAssignableToExpectedType";
- internal const string ReaderValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint = "ReaderValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint";
- internal const string ODataMessageReader_ReaderAlreadyUsed = "ODataMessageReader_ReaderAlreadyUsed";
- internal const string ODataMessageReader_ErrorPayloadInRequest = "ODataMessageReader_ErrorPayloadInRequest";
- internal const string ODataMessageReader_ServiceDocumentInRequest = "ODataMessageReader_ServiceDocumentInRequest";
- internal const string ODataMessageReader_MetadataDocumentInRequest = "ODataMessageReader_MetadataDocumentInRequest";
- internal const string ODataMessageReader_DeltaInRequest = "ODataMessageReader_DeltaInRequest";
- internal const string ODataMessageReader_ExpectedTypeSpecifiedWithoutMetadata = "ODataMessageReader_ExpectedTypeSpecifiedWithoutMetadata";
- internal const string ODataMessageReader_EntitySetSpecifiedWithoutMetadata = "ODataMessageReader_EntitySetSpecifiedWithoutMetadata";
- internal const string ODataMessageReader_OperationImportSpecifiedWithoutMetadata = "ODataMessageReader_OperationImportSpecifiedWithoutMetadata";
- internal const string ODataMessageReader_OperationSpecifiedWithoutMetadata = "ODataMessageReader_OperationSpecifiedWithoutMetadata";
- internal const string ODataMessageReader_ExpectedCollectionTypeWrongKind = "ODataMessageReader_ExpectedCollectionTypeWrongKind";
- internal const string ODataMessageReader_ExpectedPropertyTypeEntityCollectionKind = "ODataMessageReader_ExpectedPropertyTypeEntityCollectionKind";
- internal const string ODataMessageReader_ExpectedPropertyTypeEntityKind = "ODataMessageReader_ExpectedPropertyTypeEntityKind";
- internal const string ODataMessageReader_ExpectedPropertyTypeStream = "ODataMessageReader_ExpectedPropertyTypeStream";
- internal const string ODataMessageReader_ExpectedValueTypeWrongKind = "ODataMessageReader_ExpectedValueTypeWrongKind";
- internal const string ODataMessageReader_NoneOrEmptyContentTypeHeader = "ODataMessageReader_NoneOrEmptyContentTypeHeader";
- internal const string ODataMessageReader_WildcardInContentType = "ODataMessageReader_WildcardInContentType";
- internal const string ODataMessageReader_GetFormatCalledBeforeReadingStarted = "ODataMessageReader_GetFormatCalledBeforeReadingStarted";
- internal const string ODataMessageReader_DetectPayloadKindMultipleTimes = "ODataMessageReader_DetectPayloadKindMultipleTimes";
- internal const string ODataMessageReader_PayloadKindDetectionRunning = "ODataMessageReader_PayloadKindDetectionRunning";
- internal const string ODataMessageReader_PayloadKindDetectionInServerMode = "ODataMessageReader_PayloadKindDetectionInServerMode";
- internal const string ODataMessageReader_ParameterPayloadInResponse = "ODataMessageReader_ParameterPayloadInResponse";
- internal const string ODataMessageReader_SingletonNavigationPropertyForEntityReferenceLinks = "ODataMessageReader_SingletonNavigationPropertyForEntityReferenceLinks";
- internal const string ODataAsyncResponseMessage_MustNotModifyMessage = "ODataAsyncResponseMessage_MustNotModifyMessage";
- internal const string ODataMessage_MustNotModifyMessage = "ODataMessage_MustNotModifyMessage";
- internal const string ODataReaderCore_SyncCallOnAsyncReader = "ODataReaderCore_SyncCallOnAsyncReader";
- internal const string ODataReaderCore_AsyncCallOnSyncReader = "ODataReaderCore_AsyncCallOnSyncReader";
- internal const string ODataReaderCore_ReadOrReadAsyncCalledInInvalidState = "ODataReaderCore_ReadOrReadAsyncCalledInInvalidState";
- internal const string ODataReaderCore_CreateReadStreamCalledInInvalidState = "ODataReaderCore_CreateReadStreamCalledInInvalidState";
- internal const string ODataReaderCore_CreateTextReaderCalledInInvalidState = "ODataReaderCore_CreateTextReaderCalledInInvalidState";
- internal const string ODataReaderCore_ReadCalledWithOpenStream = "ODataReaderCore_ReadCalledWithOpenStream";
- internal const string ODataReaderCore_NoReadCallsAllowed = "ODataReaderCore_NoReadCallsAllowed";
- internal const string ODataWriterCore_PropertyValueAlreadyWritten = "ODataWriterCore_PropertyValueAlreadyWritten";
- internal const string ODataJsonReader_CannotReadResourcesOfResourceSet = "ODataJsonReader_CannotReadResourcesOfResourceSet";
- internal const string ODataJsonReaderUtils_CannotConvertInt32 = "ODataJsonReaderUtils_CannotConvertInt32";
- internal const string ODataJsonReaderUtils_CannotConvertDouble = "ODataJsonReaderUtils_CannotConvertDouble";
- internal const string ODataJsonReaderUtils_CannotConvertBoolean = "ODataJsonReaderUtils_CannotConvertBoolean";
- internal const string ODataJsonReaderUtils_CannotConvertDecimal = "ODataJsonReaderUtils_CannotConvertDecimal";
- internal const string ODataJsonReaderUtils_CannotConvertDateTime = "ODataJsonReaderUtils_CannotConvertDateTime";
- internal const string ODataJsonReaderUtils_CannotConvertDateTimeOffset = "ODataJsonReaderUtils_CannotConvertDateTimeOffset";
- internal const string ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter = "ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter";
- internal const string ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName = "ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName";
- internal const string ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustSpecifyTarget = "ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustSpecifyTarget";
- internal const string ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustNotHaveDuplicateTarget = "ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustNotHaveDuplicateTarget";
- internal const string ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty = "ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty";
- internal const string ODataJsonErrorDeserializer_TopLevelErrorMessageValueWithInvalidProperty = "ODataJsonErrorDeserializer_TopLevelErrorMessageValueWithInvalidProperty";
- internal const string ODataCollectionReaderCore_ReadOrReadAsyncCalledInInvalidState = "ODataCollectionReaderCore_ReadOrReadAsyncCalledInInvalidState";
- internal const string ODataCollectionReaderCore_SyncCallOnAsyncReader = "ODataCollectionReaderCore_SyncCallOnAsyncReader";
- internal const string ODataCollectionReaderCore_AsyncCallOnSyncReader = "ODataCollectionReaderCore_AsyncCallOnSyncReader";
- internal const string ODataCollectionReaderCore_ExpectedItemTypeSetInInvalidState = "ODataCollectionReaderCore_ExpectedItemTypeSetInInvalidState";
- internal const string ODataParameterReaderCore_ReadOrReadAsyncCalledInInvalidState = "ODataParameterReaderCore_ReadOrReadAsyncCalledInInvalidState";
- internal const string ODataParameterReaderCore_SyncCallOnAsyncReader = "ODataParameterReaderCore_SyncCallOnAsyncReader";
- internal const string ODataParameterReaderCore_AsyncCallOnSyncReader = "ODataParameterReaderCore_AsyncCallOnSyncReader";
- internal const string ODataParameterReaderCore_SubReaderMustBeCreatedAndReadToCompletionBeforeTheNextReadOrReadAsyncCall = "ODataParameterReaderCore_SubReaderMustBeCreatedAndReadToCompletionBeforeTheNextReadOrReadAsyncCall";
- internal const string ODataParameterReaderCore_SubReaderMustBeInCompletedStateBeforeTheNextReadOrReadAsyncCall = "ODataParameterReaderCore_SubReaderMustBeInCompletedStateBeforeTheNextReadOrReadAsyncCall";
- internal const string ODataParameterReaderCore_InvalidCreateReaderMethodCalledForState = "ODataParameterReaderCore_InvalidCreateReaderMethodCalledForState";
- internal const string ODataParameterReaderCore_CreateReaderAlreadyCalled = "ODataParameterReaderCore_CreateReaderAlreadyCalled";
- internal const string ODataParameterReaderCore_ParameterNameNotInMetadata = "ODataParameterReaderCore_ParameterNameNotInMetadata";
- internal const string ODataParameterReaderCore_DuplicateParametersInPayload = "ODataParameterReaderCore_DuplicateParametersInPayload";
- internal const string ODataParameterReaderCore_ParametersMissingInPayload = "ODataParameterReaderCore_ParametersMissingInPayload";
- internal const string ValidationUtils_ActionsAndFunctionsMustSpecifyMetadata = "ValidationUtils_ActionsAndFunctionsMustSpecifyMetadata";
- internal const string ValidationUtils_ActionsAndFunctionsMustSpecifyTarget = "ValidationUtils_ActionsAndFunctionsMustSpecifyTarget";
- internal const string ValidationUtils_EnumerableContainsANullItem = "ValidationUtils_EnumerableContainsANullItem";
- internal const string ValidationUtils_AssociationLinkMustSpecifyName = "ValidationUtils_AssociationLinkMustSpecifyName";
- internal const string ValidationUtils_AssociationLinkMustSpecifyUrl = "ValidationUtils_AssociationLinkMustSpecifyUrl";
- internal const string ValidationUtils_TypeNameMustNotBeEmpty = "ValidationUtils_TypeNameMustNotBeEmpty";
- internal const string ValidationUtils_PropertyDoesNotExistOnType = "ValidationUtils_PropertyDoesNotExistOnType";
- internal const string ValidationUtils_ResourceMustSpecifyUrl = "ValidationUtils_ResourceMustSpecifyUrl";
- internal const string ValidationUtils_ResourceMustSpecifyName = "ValidationUtils_ResourceMustSpecifyName";
- internal const string ValidationUtils_ServiceDocumentElementUrlMustNotBeNull = "ValidationUtils_ServiceDocumentElementUrlMustNotBeNull";
- internal const string ValidationUtils_NonPrimitiveTypeForPrimitiveValue = "ValidationUtils_NonPrimitiveTypeForPrimitiveValue";
- internal const string ValidationUtils_UnsupportedPrimitiveType = "ValidationUtils_UnsupportedPrimitiveType";
- internal const string ValidationUtils_IncompatiblePrimitiveItemType = "ValidationUtils_IncompatiblePrimitiveItemType";
- internal const string ValidationUtils_NonNullableCollectionElementsMustNotBeNull = "ValidationUtils_NonNullableCollectionElementsMustNotBeNull";
- internal const string ValidationUtils_InvalidCollectionTypeName = "ValidationUtils_InvalidCollectionTypeName";
- internal const string ValidationUtils_UnrecognizedTypeName = "ValidationUtils_UnrecognizedTypeName";
- internal const string ValidationUtils_IncorrectTypeKind = "ValidationUtils_IncorrectTypeKind";
- internal const string ValidationUtils_IncorrectTypeKindNoTypeName = "ValidationUtils_IncorrectTypeKindNoTypeName";
- internal const string ValidationUtils_IncorrectValueTypeKind = "ValidationUtils_IncorrectValueTypeKind";
- internal const string ValidationUtils_LinkMustSpecifyName = "ValidationUtils_LinkMustSpecifyName";
- internal const string ValidationUtils_MismatchPropertyKindForStreamProperty = "ValidationUtils_MismatchPropertyKindForStreamProperty";
- internal const string ValidationUtils_NestedCollectionsAreNotSupported = "ValidationUtils_NestedCollectionsAreNotSupported";
- internal const string ValidationUtils_StreamReferenceValuesNotSupportedInCollections = "ValidationUtils_StreamReferenceValuesNotSupportedInCollections";
- internal const string ValidationUtils_IncompatibleType = "ValidationUtils_IncompatibleType";
- internal const string ValidationUtils_OpenCollectionProperty = "ValidationUtils_OpenCollectionProperty";
- internal const string ValidationUtils_OpenStreamProperty = "ValidationUtils_OpenStreamProperty";
- internal const string ValidationUtils_InvalidCollectionTypeReference = "ValidationUtils_InvalidCollectionTypeReference";
- internal const string ValidationUtils_ResourceWithMediaResourceAndNonMLEType = "ValidationUtils_ResourceWithMediaResourceAndNonMLEType";
- internal const string ValidationUtils_ResourceWithoutMediaResourceAndMLEType = "ValidationUtils_ResourceWithoutMediaResourceAndMLEType";
- internal const string ValidationUtils_ResourceTypeNotAssignableToExpectedType = "ValidationUtils_ResourceTypeNotAssignableToExpectedType";
- internal const string ValidationUtils_NavigationPropertyExpected = "ValidationUtils_NavigationPropertyExpected";
- internal const string ValidationUtils_InvalidBatchBoundaryDelimiterLength = "ValidationUtils_InvalidBatchBoundaryDelimiterLength";
- internal const string ValidationUtils_RecursionDepthLimitReached = "ValidationUtils_RecursionDepthLimitReached";
- internal const string ValidationUtils_MaxDepthOfNestedEntriesExceeded = "ValidationUtils_MaxDepthOfNestedEntriesExceeded";
- internal const string ValidationUtils_NullCollectionItemForNonNullableType = "ValidationUtils_NullCollectionItemForNonNullableType";
- internal const string ValidationUtils_PropertiesMustNotContainReservedChars = "ValidationUtils_PropertiesMustNotContainReservedChars";
- internal const string ValidationUtils_WorkspaceResourceMustNotContainNullItem = "ValidationUtils_WorkspaceResourceMustNotContainNullItem";
- internal const string ValidationUtils_InvalidMetadataReferenceProperty = "ValidationUtils_InvalidMetadataReferenceProperty";
- internal const string WriterValidationUtils_PropertyMustNotBeNull = "WriterValidationUtils_PropertyMustNotBeNull";
- internal const string WriterValidationUtils_PropertiesMustHaveNonEmptyName = "WriterValidationUtils_PropertiesMustHaveNonEmptyName";
- internal const string WriterValidationUtils_MissingTypeNameWithMetadata = "WriterValidationUtils_MissingTypeNameWithMetadata";
- internal const string WriterValidationUtils_NextPageLinkInRequest = "WriterValidationUtils_NextPageLinkInRequest";
- internal const string WriterValidationUtils_DefaultStreamWithContentTypeWithoutReadLink = "WriterValidationUtils_DefaultStreamWithContentTypeWithoutReadLink";
- internal const string WriterValidationUtils_DefaultStreamWithReadLinkWithoutContentType = "WriterValidationUtils_DefaultStreamWithReadLinkWithoutContentType";
- internal const string WriterValidationUtils_StreamReferenceValueMustHaveEditLinkOrReadLink = "WriterValidationUtils_StreamReferenceValueMustHaveEditLinkOrReadLink";
- internal const string WriterValidationUtils_StreamReferenceValueMustHaveEditLinkToHaveETag = "WriterValidationUtils_StreamReferenceValueMustHaveEditLinkToHaveETag";
- internal const string WriterValidationUtils_StreamReferenceValueEmptyContentType = "WriterValidationUtils_StreamReferenceValueEmptyContentType";
- internal const string WriterValidationUtils_EntriesMustHaveNonEmptyId = "WriterValidationUtils_EntriesMustHaveNonEmptyId";
- internal const string WriterValidationUtils_MessageWriterSettingsBaseUriMustBeNullOrAbsolute = "WriterValidationUtils_MessageWriterSettingsBaseUriMustBeNullOrAbsolute";
- internal const string WriterValidationUtils_EntityReferenceLinkUrlMustNotBeNull = "WriterValidationUtils_EntityReferenceLinkUrlMustNotBeNull";
- internal const string WriterValidationUtils_EntityReferenceLinksLinkMustNotBeNull = "WriterValidationUtils_EntityReferenceLinksLinkMustNotBeNull";
- internal const string WriterValidationUtils_NestedResourceTypeNotCompatibleWithParentPropertyType = "WriterValidationUtils_NestedResourceTypeNotCompatibleWithParentPropertyType";
- internal const string WriterValidationUtils_ExpandedLinkIsCollectionTrueWithResourceContent = "WriterValidationUtils_ExpandedLinkIsCollectionTrueWithResourceContent";
- internal const string WriterValidationUtils_ExpandedLinkIsCollectionFalseWithResourceSetContent = "WriterValidationUtils_ExpandedLinkIsCollectionFalseWithResourceSetContent";
- internal const string WriterValidationUtils_ExpandedLinkIsCollectionTrueWithResourceMetadata = "WriterValidationUtils_ExpandedLinkIsCollectionTrueWithResourceMetadata";
- internal const string WriterValidationUtils_ExpandedLinkIsCollectionFalseWithResourceSetMetadata = "WriterValidationUtils_ExpandedLinkIsCollectionFalseWithResourceSetMetadata";
- internal const string WriterValidationUtils_ExpandedLinkWithResourceSetPayloadAndResourceMetadata = "WriterValidationUtils_ExpandedLinkWithResourceSetPayloadAndResourceMetadata";
- internal const string WriterValidationUtils_ExpandedLinkWithResourcePayloadAndResourceSetMetadata = "WriterValidationUtils_ExpandedLinkWithResourcePayloadAndResourceSetMetadata";
- internal const string WriterValidationUtils_CollectionPropertiesMustNotHaveNullValue = "WriterValidationUtils_CollectionPropertiesMustNotHaveNullValue";
- internal const string WriterValidationUtils_NonNullablePropertiesMustNotHaveNullValue = "WriterValidationUtils_NonNullablePropertiesMustNotHaveNullValue";
- internal const string WriterValidationUtils_StreamPropertiesMustNotHaveNullValue = "WriterValidationUtils_StreamPropertiesMustNotHaveNullValue";
- internal const string WriterValidationUtils_OperationInRequest = "WriterValidationUtils_OperationInRequest";
- internal const string WriterValidationUtils_AssociationLinkInRequest = "WriterValidationUtils_AssociationLinkInRequest";
- internal const string WriterValidationUtils_StreamPropertyInRequest = "WriterValidationUtils_StreamPropertyInRequest";
- internal const string WriterValidationUtils_MessageWriterSettingsServiceDocumentUriMustBeNullOrAbsolute = "WriterValidationUtils_MessageWriterSettingsServiceDocumentUriMustBeNullOrAbsolute";
- internal const string WriterValidationUtils_NavigationLinkMustSpecifyUrl = "WriterValidationUtils_NavigationLinkMustSpecifyUrl";
- internal const string WriterValidationUtils_NestedResourceInfoMustSpecifyIsCollection = "WriterValidationUtils_NestedResourceInfoMustSpecifyIsCollection";
- internal const string WriterValidationUtils_MessageWriterSettingsJsonPaddingOnRequestMessage = "WriterValidationUtils_MessageWriterSettingsJsonPaddingOnRequestMessage";
- internal const string WriterValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint = "WriterValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint";
- internal const string XmlReaderExtension_InvalidNodeInStringValue = "XmlReaderExtension_InvalidNodeInStringValue";
- internal const string XmlReaderExtension_InvalidRootNode = "XmlReaderExtension_InvalidRootNode";
- internal const string ODataMetadataInputContext_ErrorReadingMetadata = "ODataMetadataInputContext_ErrorReadingMetadata";
- internal const string ODataMetadataOutputContext_ErrorWritingMetadata = "ODataMetadataOutputContext_ErrorWritingMetadata";
- internal const string ODataMetadataOutputContext_NotSupportJsonMetadata = "ODataMetadataOutputContext_NotSupportJsonMetadata";
- internal const string ODataXmlDeserializer_RelativeUriUsedWithoutBaseUriSpecified = "ODataXmlDeserializer_RelativeUriUsedWithoutBaseUriSpecified";
- internal const string ODataPropertyAndValueDeserializer_InvalidCollectionElement = "ODataPropertyAndValueDeserializer_InvalidCollectionElement";
- internal const string ODataPropertyAndValueDeserializer_NavigationPropertyInProperties = "ODataPropertyAndValueDeserializer_NavigationPropertyInProperties";
- internal const string JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation = "JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation";
- internal const string EdmLibraryExtensions_OperationGroupReturningActionsAndFunctionsModelInvalid = "EdmLibraryExtensions_OperationGroupReturningActionsAndFunctionsModelInvalid";
- internal const string EdmLibraryExtensions_UnBoundOperationsFoundFromIEdmModelFindMethodIsInvalid = "EdmLibraryExtensions_UnBoundOperationsFoundFromIEdmModelFindMethodIsInvalid";
- internal const string EdmLibraryExtensions_NoParameterBoundOperationsFoundFromIEdmModelFindMethodIsInvalid = "EdmLibraryExtensions_NoParameterBoundOperationsFoundFromIEdmModelFindMethodIsInvalid";
- internal const string EdmLibraryExtensions_ValueOverflowForUnderlyingType = "EdmLibraryExtensions_ValueOverflowForUnderlyingType";
- internal const string ODataXmlResourceDeserializer_ContentWithWrongType = "ODataXmlResourceDeserializer_ContentWithWrongType";
- internal const string ODataXmlErrorDeserializer_MultipleErrorElementsWithSameName = "ODataXmlErrorDeserializer_MultipleErrorElementsWithSameName";
- internal const string ODataXmlErrorDeserializer_MultipleInnerErrorElementsWithSameName = "ODataXmlErrorDeserializer_MultipleInnerErrorElementsWithSameName";
- internal const string CollectionWithoutExpectedTypeValidator_InvalidItemTypeKind = "CollectionWithoutExpectedTypeValidator_InvalidItemTypeKind";
- internal const string CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeKind = "CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeKind";
- internal const string CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName = "CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName";
- internal const string ResourceSetWithoutExpectedTypeValidator_IncompatibleTypes = "ResourceSetWithoutExpectedTypeValidator_IncompatibleTypes";
- internal const string MessageStreamWrappingStream_ByteLimitExceeded = "MessageStreamWrappingStream_ByteLimitExceeded";
- internal const string MetadataUtils_ResolveTypeName = "MetadataUtils_ResolveTypeName";
- internal const string MetadataUtils_CalculateBindableOperationsForType = "MetadataUtils_CalculateBindableOperationsForType";
- internal const string EdmValueUtils_UnsupportedPrimitiveType = "EdmValueUtils_UnsupportedPrimitiveType";
- internal const string EdmValueUtils_IncorrectPrimitiveTypeKind = "EdmValueUtils_IncorrectPrimitiveTypeKind";
- internal const string EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName = "EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName";
- internal const string EdmValueUtils_CannotConvertTypeToClrValue = "EdmValueUtils_CannotConvertTypeToClrValue";
- internal const string ODataEdmStructuredValue_UndeclaredProperty = "ODataEdmStructuredValue_UndeclaredProperty";
- internal const string ODataMetadataBuilder_MissingEntitySetUri = "ODataMetadataBuilder_MissingEntitySetUri";
- internal const string ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix = "ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix";
- internal const string ODataMetadataBuilder_MissingEntityInstanceUri = "ODataMetadataBuilder_MissingEntityInstanceUri";
- internal const string ODataMetadataBuilder_MissingParentIdOrContextUrl = "ODataMetadataBuilder_MissingParentIdOrContextUrl";
- internal const string ODataMetadataBuilder_UnknownEntitySet = "ODataMetadataBuilder_UnknownEntitySet";
- internal const string ODataJsonInputContext_EntityTypeMustBeCompatibleWithEntitySetBaseType = "ODataJsonInputContext_EntityTypeMustBeCompatibleWithEntitySetBaseType";
- internal const string ODataJsonInputContext_PayloadKindDetectionForRequest = "ODataJsonInputContext_PayloadKindDetectionForRequest";
- internal const string ODataJsonInputContext_OperationCannotBeNullForCreateParameterReader = "ODataJsonInputContext_OperationCannotBeNullForCreateParameterReader";
- internal const string ODataJsonInputContext_NoEntitySetForRequest = "ODataJsonInputContext_NoEntitySetForRequest";
- internal const string ODataJsonInputContext_ModelRequiredForReading = "ODataJsonInputContext_ModelRequiredForReading";
- internal const string ODataJsonInputContext_ItemTypeRequiredForCollectionReaderInRequests = "ODataJsonInputContext_ItemTypeRequiredForCollectionReaderInRequests";
- internal const string ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty = "ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty";
- internal const string ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation = "ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation";
- internal const string ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue = "ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue";
- internal const string ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest = "ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest";
- internal const string ODataJsonWriter_InstanceAnnotationNotSupportedOnExpandedResourceSet = "ODataJsonWriter_InstanceAnnotationNotSupportedOnExpandedResourceSet";
- internal const string ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest = "ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest";
- internal const string ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest = "ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest";
- internal const string ODataResourceTypeContext_MetadataOrSerializationInfoMissing = "ODataResourceTypeContext_MetadataOrSerializationInfoMissing";
- internal const string ODataResourceTypeContext_ODataResourceTypeNameMissing = "ODataResourceTypeContext_ODataResourceTypeNameMissing";
- internal const string ODataContextUriBuilder_ValidateDerivedType = "ODataContextUriBuilder_ValidateDerivedType";
- internal const string ODataContextUriBuilder_TypeNameMissingForTopLevelCollection = "ODataContextUriBuilder_TypeNameMissingForTopLevelCollection";
- internal const string ODataContextUriBuilder_UnsupportedPayloadKind = "ODataContextUriBuilder_UnsupportedPayloadKind";
- internal const string ODataContextUriBuilder_StreamValueMustBePropertiesOfODataResource = "ODataContextUriBuilder_StreamValueMustBePropertiesOfODataResource";
- internal const string ODataContextUriBuilder_NavigationSourceOrTypeNameMissingForResourceOrResourceSet = "ODataContextUriBuilder_NavigationSourceOrTypeNameMissingForResourceOrResourceSet";
- internal const string ODataContextUriBuilder_ODataUriMissingForIndividualProperty = "ODataContextUriBuilder_ODataUriMissingForIndividualProperty";
- internal const string ODataContextUriBuilder_TypeNameMissingForProperty = "ODataContextUriBuilder_TypeNameMissingForProperty";
- internal const string ODataContextUriBuilder_ODataPathInvalidForContainedElement = "ODataContextUriBuilder_ODataPathInvalidForContainedElement";
- internal const string ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties = "ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties";
- internal const string ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation = "ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation";
- internal const string ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation = "ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation";
- internal const string ODataJsonPropertyAndValueDeserializer_UnexpectedProperty = "ODataJsonPropertyAndValueDeserializer_UnexpectedProperty";
- internal const string ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload = "ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload";
- internal const string ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName = "ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName";
- internal const string ODataJsonPropertyAndValueDeserializer_InvalidTypeName = "ODataJsonPropertyAndValueDeserializer_InvalidTypeName";
- internal const string ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty = "ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty";
- internal const string ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty = "ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty";
- internal const string ODataJsonPropertyAndValueDeserializer_ComplexValueWithPropertyTypeAnnotation = "ODataJsonPropertyAndValueDeserializer_ComplexValueWithPropertyTypeAnnotation";
- internal const string ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst = "ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst";
- internal const string ODataJsonPropertyAndValueDeserializer_UnexpectedDataPropertyAnnotation = "ODataJsonPropertyAndValueDeserializer_UnexpectedDataPropertyAnnotation";
- internal const string ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty = "ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty";
- internal const string ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue = "ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue";
- internal const string ODataJsonPropertyAndValueDeserializer_TopLevelPropertyWithPrimitiveNullValue = "ODataJsonPropertyAndValueDeserializer_TopLevelPropertyWithPrimitiveNullValue";
- internal const string ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty = "ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty";
- internal const string ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload = "ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload";
- internal const string ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected = "ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected";
- internal const string ODataJsonPropertyAndValueDeserializer_CollectionTypeExpected = "ODataJsonPropertyAndValueDeserializer_CollectionTypeExpected";
- internal const string ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty = "ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty";
- internal const string ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue = "ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue";
- internal const string ODataJsonReader_UnexpectedPrimitiveValueForODataResource = "ODataJsonReader_UnexpectedPrimitiveValueForODataResource";
- internal const string ODataJsonReaderUtils_AnnotationWithNullValue = "ODataJsonReaderUtils_AnnotationWithNullValue";
- internal const string ODataJsonReaderUtils_InvalidValueForODataNullAnnotation = "ODataJsonReaderUtils_InvalidValueForODataNullAnnotation";
- internal const string JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection = "JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection";
- internal const string ODataJsonContextUriParser_NullMetadataDocumentUri = "ODataJsonContextUriParser_NullMetadataDocumentUri";
- internal const string ODataJsonContextUriParser_ContextUriDoesNotMatchExpectedPayloadKind = "ODataJsonContextUriParser_ContextUriDoesNotMatchExpectedPayloadKind";
- internal const string ODataJsonContextUriParser_InvalidEntitySetNameOrTypeName = "ODataJsonContextUriParser_InvalidEntitySetNameOrTypeName";
- internal const string ODataJsonContextUriParser_InvalidPayloadKindWithSelectQueryOption = "ODataJsonContextUriParser_InvalidPayloadKindWithSelectQueryOption";
- internal const string ODataJsonContextUriParser_NoModel = "ODataJsonContextUriParser_NoModel";
- internal const string ODataJsonContextUriParser_InvalidContextUrl = "ODataJsonContextUriParser_InvalidContextUrl";
- internal const string ODataJsonContextUriParser_LastSegmentIsKeySegment = "ODataJsonContextUriParser_LastSegmentIsKeySegment";
- internal const string ODataJsonContextUriParser_TopLevelContextUrlShouldBeAbsolute = "ODataJsonContextUriParser_TopLevelContextUrlShouldBeAbsolute";
- internal const string ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject = "ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject";
- internal const string ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst = "ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst";
- internal const string ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty = "ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty";
- internal const string ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload = "ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload";
- internal const string ODataJsonResourceDeserializer_CannotReadResourceSetContentStart = "ODataJsonResourceDeserializer_CannotReadResourceSetContentStart";
- internal const string ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound = "ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound";
- internal const string ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet = "ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet";
- internal const string ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet = "ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet";
- internal const string ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet = "ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet";
- internal const string ODataJsonResourceDeserializer_PropertyWithoutValueWithWrongType = "ODataJsonResourceDeserializer_PropertyWithoutValueWithWrongType";
- internal const string ODataJsonResourceDeserializer_StreamPropertyInRequest = "ODataJsonResourceDeserializer_StreamPropertyInRequest";
- internal const string ODataJsonResourceDeserializer_UnexpectedStreamPropertyAnnotation = "ODataJsonResourceDeserializer_UnexpectedStreamPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_StreamPropertyWithValue = "ODataJsonResourceDeserializer_StreamPropertyWithValue";
- internal const string ODataJsonResourceDeserializer_UnexpectedDeferredLinkPropertyAnnotation = "ODataJsonResourceDeserializer_UnexpectedDeferredLinkPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_CannotReadSingletonNestedResource = "ODataJsonResourceDeserializer_CannotReadSingletonNestedResource";
- internal const string ODataJsonResourceDeserializer_CannotReadCollectionNestedResource = "ODataJsonResourceDeserializer_CannotReadCollectionNestedResource";
- internal const string ODataJsonResourceDeserializer_CannotReadNestedResource = "ODataJsonResourceDeserializer_CannotReadNestedResource";
- internal const string ODataJsonResourceDeserializer_UnexpectedExpandedSingletonNavigationLinkPropertyAnnotation = "ODataJsonResourceDeserializer_UnexpectedExpandedSingletonNavigationLinkPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_UnexpectedExpandedCollectionNavigationLinkPropertyAnnotation = "ODataJsonResourceDeserializer_UnexpectedExpandedCollectionNavigationLinkPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_UnexpectedComplexCollectionPropertyAnnotation = "ODataJsonResourceDeserializer_UnexpectedComplexCollectionPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation = "ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation";
- internal const string ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet = "ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet";
- internal const string ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation = "ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_ArrayValueForSingletonBindPropertyAnnotation = "ODataJsonResourceDeserializer_ArrayValueForSingletonBindPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_StringValueForCollectionBindPropertyAnnotation = "ODataJsonResourceDeserializer_StringValueForCollectionBindPropertyAnnotation";
- internal const string ODataJsonResourceDeserializer_EmptyBindArray = "ODataJsonResourceDeserializer_EmptyBindArray";
- internal const string ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink = "ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink";
- internal const string ODataJsonResourceDeserializer_SingletonNavigationPropertyWithBindingAndValue = "ODataJsonResourceDeserializer_SingletonNavigationPropertyWithBindingAndValue";
- internal const string ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType = "ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType";
- internal const string ODataJsonResourceDeserializer_OperationIsNotActionOrFunction = "ODataJsonResourceDeserializer_OperationIsNotActionOrFunction";
- internal const string ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation = "ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation";
- internal const string ODataJsonResourceDeserializer_OperationMissingTargetProperty = "ODataJsonResourceDeserializer_OperationMissingTargetProperty";
- internal const string ODataJsonResourceDeserializer_MetadataReferencePropertyInRequest = "ODataJsonResourceDeserializer_MetadataReferencePropertyInRequest";
- internal const string ODataJsonValidationUtils_OperationPropertyCannotBeNull = "ODataJsonValidationUtils_OperationPropertyCannotBeNull";
- internal const string ODataJsonValidationUtils_OpenMetadataReferencePropertyNotSupported = "ODataJsonValidationUtils_OpenMetadataReferencePropertyNotSupported";
- internal const string ODataJsonDeserializer_RelativeUriUsedWithouODataMetadataAnnotation = "ODataJsonDeserializer_RelativeUriUsedWithouODataMetadataAnnotation";
- internal const string ODataJsonResourceMetadataContext_MetadataAnnotationMustBeInPayload = "ODataJsonResourceMetadataContext_MetadataAnnotationMustBeInPayload";
- internal const string ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound = "ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound";
- internal const string ODataJsonCollectionDeserializer_CannotReadCollectionContentStart = "ODataJsonCollectionDeserializer_CannotReadCollectionContentStart";
- internal const string ODataJsonCollectionDeserializer_CannotReadCollectionEnd = "ODataJsonCollectionDeserializer_CannotReadCollectionEnd";
- internal const string ODataJsonCollectionDeserializer_InvalidCollectionTypeName = "ODataJsonCollectionDeserializer_InvalidCollectionTypeName";
- internal const string ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue = "ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue";
- internal const string ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink = "ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink";
- internal const string ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink = "ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink";
- internal const string ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink = "ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink";
- internal const string ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty = "ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty";
- internal const string ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink = "ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink";
- internal const string ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull = "ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull";
- internal const string ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks = "ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks";
- internal const string ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound = "ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound";
- internal const string ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks = "ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks";
- internal const string ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound = "ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound";
- internal const string ODataJsonOperationsDeserializerUtils_OperationPropertyCannotBeNull = "ODataJsonOperationsDeserializerUtils_OperationPropertyCannotBeNull";
- internal const string ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue = "ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue";
- internal const string ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument = "ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument";
- internal const string ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocumentElement = "ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocumentElement";
- internal const string ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument = "ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument";
- internal const string ODataJsonServiceDocumentDeserializer_MissingRequiredPropertyInServiceDocumentElement = "ODataJsonServiceDocumentDeserializer_MissingRequiredPropertyInServiceDocumentElement";
- internal const string ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument = "ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument";
- internal const string ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument = "ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument";
- internal const string ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement = "ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement";
- internal const string ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement = "ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement";
- internal const string ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement = "ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement";
- internal const string ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument = "ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument";
- internal const string ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty = "ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty";
- internal const string ODataJsonParameterDeserializer_PropertyAnnotationForParameters = "ODataJsonParameterDeserializer_PropertyAnnotationForParameters";
- internal const string ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters = "ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters";
- internal const string ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType = "ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType";
- internal const string ODataJsonParameterDeserializer_NullCollectionExpected = "ODataJsonParameterDeserializer_NullCollectionExpected";
- internal const string ODataJsonParameterDeserializer_UnsupportedParameterTypeKind = "ODataJsonParameterDeserializer_UnsupportedParameterTypeKind";
- internal const string SelectedPropertiesNode_StarSegmentNotLastSegment = "SelectedPropertiesNode_StarSegmentNotLastSegment";
- internal const string SelectedPropertiesNode_StarSegmentAfterTypeSegment = "SelectedPropertiesNode_StarSegmentAfterTypeSegment";
- internal const string ODataJsonErrorDeserializer_PropertyAnnotationNotAllowedInErrorPayload = "ODataJsonErrorDeserializer_PropertyAnnotationNotAllowedInErrorPayload";
- internal const string ODataJsonErrorDeserializer_InstanceAnnotationNotAllowedInErrorPayload = "ODataJsonErrorDeserializer_InstanceAnnotationNotAllowedInErrorPayload";
- internal const string ODataJsonErrorDeserializer_PropertyAnnotationWithoutPropertyForError = "ODataJsonErrorDeserializer_PropertyAnnotationWithoutPropertyForError";
- internal const string ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty = "ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty";
- internal const string ODataConventionalUriBuilder_EntityTypeWithNoKeyProperties = "ODataConventionalUriBuilder_EntityTypeWithNoKeyProperties";
- internal const string ODataConventionalUriBuilder_NullKeyValue = "ODataConventionalUriBuilder_NullKeyValue";
- internal const string ODataResourceMetadataContext_EntityTypeWithNoKeyProperties = "ODataResourceMetadataContext_EntityTypeWithNoKeyProperties";
- internal const string ODataResourceMetadataContext_NullKeyValue = "ODataResourceMetadataContext_NullKeyValue";
- internal const string ODataResourceMetadataContext_KeyOrETagValuesMustBePrimitiveValues = "ODataResourceMetadataContext_KeyOrETagValuesMustBePrimitiveValues";
- internal const string ODataResource_PropertyValueCannotBeODataResourceValue = "ODataResource_PropertyValueCannotBeODataResourceValue";
- internal const string EdmValueUtils_NonPrimitiveValue = "EdmValueUtils_NonPrimitiveValue";
- internal const string EdmValueUtils_PropertyDoesntExist = "EdmValueUtils_PropertyDoesntExist";
- internal const string ODataPrimitiveValue_CannotCreateODataPrimitiveValueFromNull = "ODataPrimitiveValue_CannotCreateODataPrimitiveValueFromNull";
- internal const string ODataPrimitiveValue_CannotCreateODataPrimitiveValueFromUnsupportedValueType = "ODataPrimitiveValue_CannotCreateODataPrimitiveValueFromUnsupportedValueType";
- internal const string ODataInstanceAnnotation_NeedPeriodInName = "ODataInstanceAnnotation_NeedPeriodInName";
- internal const string ODataInstanceAnnotation_ReservedNamesNotAllowed = "ODataInstanceAnnotation_ReservedNamesNotAllowed";
- internal const string ODataInstanceAnnotation_BadTermName = "ODataInstanceAnnotation_BadTermName";
- internal const string ODataInstanceAnnotation_ValueCannotBeODataStreamReferenceValue = "ODataInstanceAnnotation_ValueCannotBeODataStreamReferenceValue";
- internal const string ODataJsonValueSerializer_MissingTypeNameOnCollection = "ODataJsonValueSerializer_MissingTypeNameOnCollection";
- internal const string ODataJsonValueSerializer_MissingRawValueOnUntyped = "ODataJsonValueSerializer_MissingRawValueOnUntyped";
- internal const string InstanceAnnotation_MissingTermAttributeOnAnnotationElement = "InstanceAnnotation_MissingTermAttributeOnAnnotationElement";
- internal const string InstanceAnnotation_AttributeValueNotationUsedWithIncompatibleType = "InstanceAnnotation_AttributeValueNotationUsedWithIncompatibleType";
- internal const string InstanceAnnotation_AttributeValueNotationUsedOnNonEmptyElement = "InstanceAnnotation_AttributeValueNotationUsedOnNonEmptyElement";
- internal const string InstanceAnnotation_MultipleAttributeValueNotationAttributes = "InstanceAnnotation_MultipleAttributeValueNotationAttributes";
- internal const string AnnotationFilterPattern_InvalidPatternMissingDot = "AnnotationFilterPattern_InvalidPatternMissingDot";
- internal const string AnnotationFilterPattern_InvalidPatternEmptySegment = "AnnotationFilterPattern_InvalidPatternEmptySegment";
- internal const string AnnotationFilterPattern_InvalidPatternWildCardInSegment = "AnnotationFilterPattern_InvalidPatternWildCardInSegment";
- internal const string AnnotationFilterPattern_InvalidPatternWildCardMustBeInLastSegment = "AnnotationFilterPattern_InvalidPatternWildCardMustBeInLastSegment";
- internal const string SyntacticTree_UriMustBeAbsolute = "SyntacticTree_UriMustBeAbsolute";
- internal const string SyntacticTree_MaxDepthInvalid = "SyntacticTree_MaxDepthInvalid";
- internal const string SyntacticTree_InvalidSkipQueryOptionValue = "SyntacticTree_InvalidSkipQueryOptionValue";
- internal const string SyntacticTree_InvalidTopQueryOptionValue = "SyntacticTree_InvalidTopQueryOptionValue";
- internal const string SyntacticTree_InvalidCountQueryOptionValue = "SyntacticTree_InvalidCountQueryOptionValue";
- internal const string SyntacticTree_InvalidIndexQueryOptionValue = "SyntacticTree_InvalidIndexQueryOptionValue";
- internal const string QueryOptionUtils_QueryParameterMustBeSpecifiedOnce = "QueryOptionUtils_QueryParameterMustBeSpecifiedOnce";
- internal const string UriBuilder_NotSupportedClrLiteral = "UriBuilder_NotSupportedClrLiteral";
- internal const string UriBuilder_NotSupportedQueryToken = "UriBuilder_NotSupportedQueryToken";
- internal const string UriQueryExpressionParser_TooDeep = "UriQueryExpressionParser_TooDeep";
- internal const string UriQueryExpressionParser_ExpressionExpected = "UriQueryExpressionParser_ExpressionExpected";
- internal const string UriQueryExpressionParser_OpenParenExpected = "UriQueryExpressionParser_OpenParenExpected";
- internal const string UriQueryExpressionParser_CloseParenOrCommaExpected = "UriQueryExpressionParser_CloseParenOrCommaExpected";
- internal const string UriQueryExpressionParser_CloseParenOrOperatorExpected = "UriQueryExpressionParser_CloseParenOrOperatorExpected";
- internal const string UriQueryExpressionParser_IllegalQueryOptioninDollarCount = "UriQueryExpressionParser_IllegalQueryOptioninDollarCount";
- internal const string UriQueryExpressionParser_CannotCreateStarTokenFromNonStar = "UriQueryExpressionParser_CannotCreateStarTokenFromNonStar";
- internal const string UriQueryExpressionParser_RangeVariableAlreadyDeclared = "UriQueryExpressionParser_RangeVariableAlreadyDeclared";
- internal const string UriQueryExpressionParser_AsExpected = "UriQueryExpressionParser_AsExpected";
- internal const string UriQueryExpressionParser_WithExpected = "UriQueryExpressionParser_WithExpected";
- internal const string UriQueryExpressionParser_UnrecognizedWithMethod = "UriQueryExpressionParser_UnrecognizedWithMethod";
- internal const string UriQueryExpressionParser_PropertyPathExpected = "UriQueryExpressionParser_PropertyPathExpected";
- internal const string UriQueryExpressionParser_KeywordOrIdentifierExpected = "UriQueryExpressionParser_KeywordOrIdentifierExpected";
- internal const string UriQueryExpressionParser_InnerMostExpandRequireFilter = "UriQueryExpressionParser_InnerMostExpandRequireFilter";
- internal const string UriQueryPathParser_RequestUriDoesNotHaveTheCorrectBaseUri = "UriQueryPathParser_RequestUriDoesNotHaveTheCorrectBaseUri";
- internal const string UriQueryPathParser_SyntaxError = "UriQueryPathParser_SyntaxError";
- internal const string UriQueryPathParser_TooManySegments = "UriQueryPathParser_TooManySegments";
- internal const string UriQueryPathParser_InvalidEscapeUri = "UriQueryPathParser_InvalidEscapeUri";
- internal const string UriUtils_DateTimeOffsetInvalidFormat = "UriUtils_DateTimeOffsetInvalidFormat";
- internal const string SelectionItemBinder_NonNavigationPathToken = "SelectionItemBinder_NonNavigationPathToken";
- internal const string MetadataBinder_ParameterAliasValueExpressionNotSingleValue = "MetadataBinder_ParameterAliasValueExpressionNotSingleValue";
- internal const string MetadataBinder_UnsupportedQueryTokenKind = "MetadataBinder_UnsupportedQueryTokenKind";
- internal const string MetadataBinder_PropertyNotDeclared = "MetadataBinder_PropertyNotDeclared";
- internal const string MetadataBinder_InvalidIdentifierInQueryOption = "MetadataBinder_InvalidIdentifierInQueryOption";
- internal const string MetadataBinder_PropertyNotDeclaredOrNotKeyInKeyValue = "MetadataBinder_PropertyNotDeclaredOrNotKeyInKeyValue";
- internal const string MetadataBinder_QualifiedFunctionNameWithParametersNotDeclared = "MetadataBinder_QualifiedFunctionNameWithParametersNotDeclared";
- internal const string MetadataBinder_UnnamedKeyValueOnTypeWithMultipleKeyProperties = "MetadataBinder_UnnamedKeyValueOnTypeWithMultipleKeyProperties";
- internal const string MetadataBinder_DuplicitKeyPropertyInKeyValues = "MetadataBinder_DuplicitKeyPropertyInKeyValues";
- internal const string MetadataBinder_NotAllKeyPropertiesSpecifiedInKeyValues = "MetadataBinder_NotAllKeyPropertiesSpecifiedInKeyValues";
- internal const string MetadataBinder_CannotConvertToType = "MetadataBinder_CannotConvertToType";
- internal const string MetadataBinder_FilterExpressionNotSingleValue = "MetadataBinder_FilterExpressionNotSingleValue";
- internal const string MetadataBinder_OrderByExpressionNotSingleValue = "MetadataBinder_OrderByExpressionNotSingleValue";
- internal const string MetadataBinder_PropertyAccessWithoutParentParameter = "MetadataBinder_PropertyAccessWithoutParentParameter";
- internal const string MetadataBinder_BinaryOperatorOperandNotSingleValue = "MetadataBinder_BinaryOperatorOperandNotSingleValue";
- internal const string MetadataBinder_UnaryOperatorOperandNotSingleValue = "MetadataBinder_UnaryOperatorOperandNotSingleValue";
- internal const string MetadataBinder_LeftOperandNotSingleValue = "MetadataBinder_LeftOperandNotSingleValue";
- internal const string MetadataBinder_RightOperandNotCollectionValue = "MetadataBinder_RightOperandNotCollectionValue";
- internal const string MetadataBinder_PropertyAccessSourceNotSingleValue = "MetadataBinder_PropertyAccessSourceNotSingleValue";
- internal const string MetadataBinder_CountSegmentNextTokenNotCollectionValue = "MetadataBinder_CountSegmentNextTokenNotCollectionValue";
- internal const string MetadataBinder_IncompatibleOperandsError = "MetadataBinder_IncompatibleOperandsError";
- internal const string MetadataBinder_IncompatibleOperandError = "MetadataBinder_IncompatibleOperandError";
- internal const string MetadataBinder_UnknownFunction = "MetadataBinder_UnknownFunction";
- internal const string MetadataBinder_FunctionArgumentNotSingleValue = "MetadataBinder_FunctionArgumentNotSingleValue";
- internal const string MetadataBinder_NoApplicableFunctionFound = "MetadataBinder_NoApplicableFunctionFound";
- internal const string MetadataBinder_BoundNodeCannotBeNull = "MetadataBinder_BoundNodeCannotBeNull";
- internal const string MetadataBinder_TopRequiresNonNegativeInteger = "MetadataBinder_TopRequiresNonNegativeInteger";
- internal const string MetadataBinder_SkipRequiresNonNegativeInteger = "MetadataBinder_SkipRequiresNonNegativeInteger";
- internal const string MetadataBinder_QueryOptionsBindStateCannotBeNull = "MetadataBinder_QueryOptionsBindStateCannotBeNull";
- internal const string MetadataBinder_QueryOptionsBindMethodCannotBeNull = "MetadataBinder_QueryOptionsBindMethodCannotBeNull";
- internal const string MetadataBinder_HierarchyNotFollowed = "MetadataBinder_HierarchyNotFollowed";
- internal const string MetadataBinder_LambdaParentMustBeCollection = "MetadataBinder_LambdaParentMustBeCollection";
- internal const string MetadataBinder_ParameterNotInScope = "MetadataBinder_ParameterNotInScope";
- internal const string MetadataBinder_NavigationPropertyNotFollowingSingleEntityType = "MetadataBinder_NavigationPropertyNotFollowingSingleEntityType";
- internal const string MetadataBinder_AnyAllExpressionNotSingleValue = "MetadataBinder_AnyAllExpressionNotSingleValue";
- internal const string MetadataBinder_CastOrIsOfExpressionWithWrongNumberOfOperands = "MetadataBinder_CastOrIsOfExpressionWithWrongNumberOfOperands";
- internal const string MetadataBinder_CastOrIsOfFunctionWithoutATypeArgument = "MetadataBinder_CastOrIsOfFunctionWithoutATypeArgument";
- internal const string MetadataBinder_CastOrIsOfCollectionsNotSupported = "MetadataBinder_CastOrIsOfCollectionsNotSupported";
- internal const string MetadataBinder_CollectionOpenPropertiesNotSupportedInThisRelease = "MetadataBinder_CollectionOpenPropertiesNotSupportedInThisRelease";
- internal const string MetadataBinder_IllegalSegmentType = "MetadataBinder_IllegalSegmentType";
- internal const string MetadataBinder_QueryOptionNotApplicable = "MetadataBinder_QueryOptionNotApplicable";
- internal const string StringItemShouldBeQuoted = "StringItemShouldBeQuoted";
- internal const string StreamItemInvalidPrimitiveKind = "StreamItemInvalidPrimitiveKind";
- internal const string ApplyBinder_AggregateExpressionIncompatibleTypeForMethod = "ApplyBinder_AggregateExpressionIncompatibleTypeForMethod";
- internal const string ApplyBinder_UnsupportedAggregateMethod = "ApplyBinder_UnsupportedAggregateMethod";
- internal const string ApplyBinder_UnsupportedAggregateKind = "ApplyBinder_UnsupportedAggregateKind";
- internal const string ApplyBinder_AggregateExpressionNotSingleValue = "ApplyBinder_AggregateExpressionNotSingleValue";
- internal const string ApplyBinder_GroupByPropertyNotPropertyAccessValue = "ApplyBinder_GroupByPropertyNotPropertyAccessValue";
- internal const string ApplyBinder_UnsupportedType = "ApplyBinder_UnsupportedType";
- internal const string ApplyBinder_UnsupportedGroupByChild = "ApplyBinder_UnsupportedGroupByChild";
- internal const string AggregateTransformationNode_UnsupportedAggregateExpressions = "AggregateTransformationNode_UnsupportedAggregateExpressions";
- internal const string FunctionCallBinder_CannotFindASuitableOverload = "FunctionCallBinder_CannotFindASuitableOverload";
- internal const string FunctionCallBinder_UriFunctionMustHaveHaveNullParent = "FunctionCallBinder_UriFunctionMustHaveHaveNullParent";
- internal const string FunctionCallBinder_CallingFunctionOnOpenProperty = "FunctionCallBinder_CallingFunctionOnOpenProperty";
- internal const string FunctionCallParser_DuplicateParameterOrEntityKeyName = "FunctionCallParser_DuplicateParameterOrEntityKeyName";
- internal const string ODataUriParser_InvalidCount = "ODataUriParser_InvalidCount";
- internal const string CastBinder_ChildTypeIsNotEntity = "CastBinder_ChildTypeIsNotEntity";
- internal const string CastBinder_EnumOnlyCastToOrFromString = "CastBinder_EnumOnlyCastToOrFromString";
- internal const string Binder_IsNotValidEnumConstant = "Binder_IsNotValidEnumConstant";
- internal const string BatchReferenceSegment_InvalidContentID = "BatchReferenceSegment_InvalidContentID";
- internal const string SelectExpandBinder_UnknownPropertyType = "SelectExpandBinder_UnknownPropertyType";
- internal const string SelectExpandBinder_InvalidIdentifierAfterWildcard = "SelectExpandBinder_InvalidIdentifierAfterWildcard";
- internal const string SelectExpandBinder_InvalidQueryOptionNestedSelection = "SelectExpandBinder_InvalidQueryOptionNestedSelection";
- internal const string SelectExpandBinder_SystemTokenInSelect = "SelectExpandBinder_SystemTokenInSelect";
- internal const string SelectionItemBinder_NoExpandForSelectedProperty = "SelectionItemBinder_NoExpandForSelectedProperty";
- internal const string SelectExpandPathBinder_FollowNonTypeSegment = "SelectExpandPathBinder_FollowNonTypeSegment";
- internal const string SelectBinder_MultiLevelPathInSelect = "SelectBinder_MultiLevelPathInSelect";
- internal const string ExpandItemBinder_TraversingANonNormalizedTree = "ExpandItemBinder_TraversingANonNormalizedTree";
- internal const string ExpandItemBinder_CannotFindType = "ExpandItemBinder_CannotFindType";
- internal const string ExpandItemBinder_PropertyIsNotANavigationPropertyOrComplexProperty = "ExpandItemBinder_PropertyIsNotANavigationPropertyOrComplexProperty";
- internal const string ExpandItemBinder_TypeSegmentNotFollowedByPath = "ExpandItemBinder_TypeSegmentNotFollowedByPath";
- internal const string ExpandItemBinder_PathTooDeep = "ExpandItemBinder_PathTooDeep";
- internal const string ExpandItemBinder_TraversingMultipleNavPropsInTheSamePath = "ExpandItemBinder_TraversingMultipleNavPropsInTheSamePath";
- internal const string ExpandItemBinder_LevelsNotAllowedOnIncompatibleRelatedType = "ExpandItemBinder_LevelsNotAllowedOnIncompatibleRelatedType";
- internal const string ExpandItemBinder_InvaidSegmentInExpand = "ExpandItemBinder_InvaidSegmentInExpand";
- internal const string Nodes_CollectionNavigationNode_MustHaveSingleMultiplicity = "Nodes_CollectionNavigationNode_MustHaveSingleMultiplicity";
- internal const string Nodes_NonentityParameterQueryNodeWithEntityType = "Nodes_NonentityParameterQueryNodeWithEntityType";
- internal const string Nodes_CollectionNavigationNode_MustHaveManyMultiplicity = "Nodes_CollectionNavigationNode_MustHaveManyMultiplicity";
- internal const string Nodes_PropertyAccessShouldBeNonEntityProperty = "Nodes_PropertyAccessShouldBeNonEntityProperty";
- internal const string Nodes_PropertyAccessTypeShouldNotBeCollection = "Nodes_PropertyAccessTypeShouldNotBeCollection";
- internal const string Nodes_PropertyAccessTypeMustBeCollection = "Nodes_PropertyAccessTypeMustBeCollection";
- internal const string Nodes_NonStaticEntitySetExpressionsAreNotSupportedInThisRelease = "Nodes_NonStaticEntitySetExpressionsAreNotSupportedInThisRelease";
- internal const string Nodes_CollectionFunctionCallNode_ItemTypeMustBePrimitiveOrComplexOrEnum = "Nodes_CollectionFunctionCallNode_ItemTypeMustBePrimitiveOrComplexOrEnum";
- internal const string Nodes_EntityCollectionFunctionCallNode_ItemTypeMustBeAnEntity = "Nodes_EntityCollectionFunctionCallNode_ItemTypeMustBeAnEntity";
- internal const string Nodes_SingleValueFunctionCallNode_ItemTypeMustBePrimitiveOrComplexOrEnum = "Nodes_SingleValueFunctionCallNode_ItemTypeMustBePrimitiveOrComplexOrEnum";
- internal const string Nodes_InNode_CollectionItemTypeMustBeSameAsSingleItemType = "Nodes_InNode_CollectionItemTypeMustBeSameAsSingleItemType";
- internal const string ExpandTreeNormalizer_NonPathInPropertyChain = "ExpandTreeNormalizer_NonPathInPropertyChain";
- internal const string SelectTreeNormalizer_MultipleSelecTermWithSamePathFound = "SelectTreeNormalizer_MultipleSelecTermWithSamePathFound";
- internal const string UriExpandParser_TermIsNotValidForStar = "UriExpandParser_TermIsNotValidForStar";
- internal const string UriExpandParser_TermIsNotValidForStarRef = "UriExpandParser_TermIsNotValidForStarRef";
- internal const string UriExpandParser_ParentStructuredTypeIsNull = "UriExpandParser_ParentStructuredTypeIsNull";
- internal const string UriExpandParser_TermWithMultipleStarNotAllowed = "UriExpandParser_TermWithMultipleStarNotAllowed";
- internal const string UriSelectParser_TermIsNotValid = "UriSelectParser_TermIsNotValid";
- internal const string UriSelectParser_InvalidTopOption = "UriSelectParser_InvalidTopOption";
- internal const string UriSelectParser_InvalidSkipOption = "UriSelectParser_InvalidSkipOption";
- internal const string UriSelectParser_InvalidCountOption = "UriSelectParser_InvalidCountOption";
- internal const string UriSelectParser_InvalidLevelsOption = "UriSelectParser_InvalidLevelsOption";
- internal const string UriSelectParser_SystemTokenInSelectExpand = "UriSelectParser_SystemTokenInSelectExpand";
- internal const string UriParser_MissingExpandOption = "UriParser_MissingExpandOption";
- internal const string UriParser_EmptyParenthesis = "UriParser_EmptyParenthesis";
- internal const string UriParser_MissingSelectOption = "UriParser_MissingSelectOption";
- internal const string UriParser_RelativeUriMustBeRelative = "UriParser_RelativeUriMustBeRelative";
- internal const string UriParser_NeedServiceRootForThisOverload = "UriParser_NeedServiceRootForThisOverload";
- internal const string UriParser_UriMustBeAbsolute = "UriParser_UriMustBeAbsolute";
- internal const string UriParser_NegativeLimit = "UriParser_NegativeLimit";
- internal const string UriParser_ExpandCountExceeded = "UriParser_ExpandCountExceeded";
- internal const string UriParser_ExpandDepthExceeded = "UriParser_ExpandDepthExceeded";
- internal const string UriParser_TypeInvalidForSelectExpand = "UriParser_TypeInvalidForSelectExpand";
- internal const string UriParser_ContextHandlerCanNotBeNull = "UriParser_ContextHandlerCanNotBeNull";
- internal const string UriParserMetadata_MultipleMatchingPropertiesFound = "UriParserMetadata_MultipleMatchingPropertiesFound";
- internal const string UriParserMetadata_MultipleMatchingNavigationSourcesFound = "UriParserMetadata_MultipleMatchingNavigationSourcesFound";
- internal const string UriParserMetadata_MultipleMatchingTypesFound = "UriParserMetadata_MultipleMatchingTypesFound";
- internal const string UriParserMetadata_MultipleMatchingKeysFound = "UriParserMetadata_MultipleMatchingKeysFound";
- internal const string UriParserMetadata_MultipleMatchingParametersFound = "UriParserMetadata_MultipleMatchingParametersFound";
- internal const string UriValidator_ValidatorMustUseSameModelAsParser = "UriValidator_ValidatorMustUseSameModelAsParser";
- internal const string PathParser_EntityReferenceNotSupported = "PathParser_EntityReferenceNotSupported";
- internal const string PathParser_CannotUseValueOnCollection = "PathParser_CannotUseValueOnCollection";
- internal const string PathParser_TypeMustBeRelatedToSet = "PathParser_TypeMustBeRelatedToSet";
- internal const string PathParser_TypeCastOnlyAllowedAfterStructuralCollection = "PathParser_TypeCastOnlyAllowedAfterStructuralCollection";
- internal const string PathParser_TypeCastOnlyAllowedInDerivedTypeConstraint = "PathParser_TypeCastOnlyAllowedInDerivedTypeConstraint";
- internal const string ODataResourceSet_MustNotContainBothNextPageLinkAndDeltaLink = "ODataResourceSet_MustNotContainBothNextPageLinkAndDeltaLink";
- internal const string ODataExpandPath_OnlyLastSegmentCanBeNavigationProperty = "ODataExpandPath_OnlyLastSegmentCanBeNavigationProperty";
- internal const string ODataExpandPath_LastSegmentMustBeNavigationPropertyOrTypeSegment = "ODataExpandPath_LastSegmentMustBeNavigationPropertyOrTypeSegment";
- internal const string ODataExpandPath_InvalidExpandPathSegment = "ODataExpandPath_InvalidExpandPathSegment";
- internal const string ODataSelectPath_CannotOnlyHaveTypeSegment = "ODataSelectPath_CannotOnlyHaveTypeSegment";
- internal const string ODataSelectPath_InvalidSelectPathSegmentType = "ODataSelectPath_InvalidSelectPathSegmentType";
- internal const string ODataSelectPath_OperationSegmentCanOnlyBeLastSegment = "ODataSelectPath_OperationSegmentCanOnlyBeLastSegment";
- internal const string ODataSelectPath_NavPropSegmentCanOnlyBeLastSegment = "ODataSelectPath_NavPropSegmentCanOnlyBeLastSegment";
- internal const string RequestUriProcessor_TargetEntitySetNotFound = "RequestUriProcessor_TargetEntitySetNotFound";
- internal const string RequestUriProcessor_FoundInvalidFunctionImport = "RequestUriProcessor_FoundInvalidFunctionImport";
- internal const string OperationSegment_ReturnTypeForMultipleOverloads = "OperationSegment_ReturnTypeForMultipleOverloads";
- internal const string OperationSegment_CannotReturnNull = "OperationSegment_CannotReturnNull";
- internal const string FunctionOverloadResolver_NoSingleMatchFound = "FunctionOverloadResolver_NoSingleMatchFound";
- internal const string FunctionOverloadResolver_MultipleActionOverloads = "FunctionOverloadResolver_MultipleActionOverloads";
- internal const string FunctionOverloadResolver_MultipleActionImportOverloads = "FunctionOverloadResolver_MultipleActionImportOverloads";
- internal const string FunctionOverloadResolver_MultipleOperationImportOverloads = "FunctionOverloadResolver_MultipleOperationImportOverloads";
- internal const string FunctionOverloadResolver_MultipleOperationOverloads = "FunctionOverloadResolver_MultipleOperationOverloads";
- internal const string FunctionOverloadResolver_FoundInvalidOperation = "FunctionOverloadResolver_FoundInvalidOperation";
- internal const string FunctionOverloadResolver_FoundInvalidOperationImport = "FunctionOverloadResolver_FoundInvalidOperationImport";
- internal const string CustomUriFunctions_AddCustomUriFunction_BuiltInExistsNotAddingAsOverload = "CustomUriFunctions_AddCustomUriFunction_BuiltInExistsNotAddingAsOverload";
- internal const string CustomUriFunctions_AddCustomUriFunction_BuiltInExistsFullSignature = "CustomUriFunctions_AddCustomUriFunction_BuiltInExistsFullSignature";
- internal const string CustomUriFunctions_AddCustomUriFunction_CustomFunctionOverloadExists = "CustomUriFunctions_AddCustomUriFunction_CustomFunctionOverloadExists";
- internal const string RequestUriProcessor_InvalidValueForEntitySegment = "RequestUriProcessor_InvalidValueForEntitySegment";
- internal const string RequestUriProcessor_InvalidValueForKeySegment = "RequestUriProcessor_InvalidValueForKeySegment";
- internal const string RequestUriProcessor_CannotApplyFilterOnSingleEntities = "RequestUriProcessor_CannotApplyFilterOnSingleEntities";
- internal const string RequestUriProcessor_CannotApplyEachOnSingleEntities = "RequestUriProcessor_CannotApplyEachOnSingleEntities";
- internal const string RequestUriProcessor_FilterPathSegmentSyntaxError = "RequestUriProcessor_FilterPathSegmentSyntaxError";
- internal const string RequestUriProcessor_NoNavigationSourceFound = "RequestUriProcessor_NoNavigationSourceFound";
- internal const string RequestUriProcessor_OnlySingleOperationCanFollowEachPathSegment = "RequestUriProcessor_OnlySingleOperationCanFollowEachPathSegment";
- internal const string RequestUriProcessor_EmptySegmentInRequestUrl = "RequestUriProcessor_EmptySegmentInRequestUrl";
- internal const string RequestUriProcessor_SyntaxError = "RequestUriProcessor_SyntaxError";
- internal const string RequestUriProcessor_CountOnRoot = "RequestUriProcessor_CountOnRoot";
- internal const string RequestUriProcessor_FilterOnRoot = "RequestUriProcessor_FilterOnRoot";
- internal const string RequestUriProcessor_EachOnRoot = "RequestUriProcessor_EachOnRoot";
- internal const string RequestUriProcessor_RefOnRoot = "RequestUriProcessor_RefOnRoot";
- internal const string RequestUriProcessor_MustBeLeafSegment = "RequestUriProcessor_MustBeLeafSegment";
- internal const string RequestUriProcessor_LinkSegmentMustBeFollowedByEntitySegment = "RequestUriProcessor_LinkSegmentMustBeFollowedByEntitySegment";
- internal const string RequestUriProcessor_MissingSegmentAfterLink = "RequestUriProcessor_MissingSegmentAfterLink";
- internal const string RequestUriProcessor_CountNotSupported = "RequestUriProcessor_CountNotSupported";
- internal const string RequestUriProcessor_CannotQueryCollections = "RequestUriProcessor_CannotQueryCollections";
- internal const string RequestUriProcessor_SegmentDoesNotSupportKeyPredicates = "RequestUriProcessor_SegmentDoesNotSupportKeyPredicates";
- internal const string RequestUriProcessor_ValueSegmentAfterScalarPropertySegment = "RequestUriProcessor_ValueSegmentAfterScalarPropertySegment";
- internal const string RequestUriProcessor_InvalidTypeIdentifier_UnrelatedType = "RequestUriProcessor_InvalidTypeIdentifier_UnrelatedType";
- internal const string OpenNavigationPropertiesNotSupportedOnOpenTypes = "OpenNavigationPropertiesNotSupportedOnOpenTypes";
- internal const string BadRequest_ResourceCanBeCrossReferencedOnlyForBindOperation = "BadRequest_ResourceCanBeCrossReferencedOnlyForBindOperation";
- internal const string DataServiceConfiguration_ResponseVersionIsBiggerThanProtocolVersion = "DataServiceConfiguration_ResponseVersionIsBiggerThanProtocolVersion";
- internal const string BadRequest_KeyCountMismatch = "BadRequest_KeyCountMismatch";
- internal const string BadRequest_KeyMismatch = "BadRequest_KeyMismatch";
- internal const string BadRequest_KeyOrAlternateKeyMismatch = "BadRequest_KeyOrAlternateKeyMismatch";
- internal const string RequestUriProcessor_KeysMustBeNamed = "RequestUriProcessor_KeysMustBeNamed";
- internal const string RequestUriProcessor_ResourceNotFound = "RequestUriProcessor_ResourceNotFound";
- internal const string RequestUriProcessor_BatchedActionOnEntityCreatedInSameChangeset = "RequestUriProcessor_BatchedActionOnEntityCreatedInSameChangeset";
- internal const string RequestUriProcessor_Forbidden = "RequestUriProcessor_Forbidden";
- internal const string RequestUriProcessor_OperationSegmentBoundToANonEntityType = "RequestUriProcessor_OperationSegmentBoundToANonEntityType";
- internal const string RequestUriProcessor_NoBoundEscapeFunctionSupported = "RequestUriProcessor_NoBoundEscapeFunctionSupported";
- internal const string RequestUriProcessor_EscapeFunctionMustHaveOneStringParameter = "RequestUriProcessor_EscapeFunctionMustHaveOneStringParameter";
- internal const string RequestUriProcessor_ComposableEscapeFunctionShouldHaveValidParameter = "RequestUriProcessor_ComposableEscapeFunctionShouldHaveValidParameter";
- internal const string General_InternalError = "General_InternalError";
- internal const string ExceptionUtils_CheckIntegerNotNegative = "ExceptionUtils_CheckIntegerNotNegative";
- internal const string ExceptionUtils_CheckIntegerPositive = "ExceptionUtils_CheckIntegerPositive";
- internal const string ExceptionUtils_CheckLongPositive = "ExceptionUtils_CheckLongPositive";
- internal const string ExceptionUtils_ArgumentStringNullOrEmpty = "ExceptionUtils_ArgumentStringNullOrEmpty";
- internal const string ExpressionToken_OnlyRefAllowWithStarInExpand = "ExpressionToken_OnlyRefAllowWithStarInExpand";
- internal const string ExpressionToken_DollarCountNotAllowedInSelect = "ExpressionToken_DollarCountNotAllowedInSelect";
- internal const string ExpressionToken_NoPropAllowedAfterDollarCount = "ExpressionToken_NoPropAllowedAfterDollarCount";
- internal const string ExpressionToken_NoPropAllowedAfterRef = "ExpressionToken_NoPropAllowedAfterRef";
- internal const string ExpressionToken_NoSegmentAllowedBeforeStarInExpand = "ExpressionToken_NoSegmentAllowedBeforeStarInExpand";
- internal const string ExpressionToken_IdentifierExpected = "ExpressionToken_IdentifierExpected";
- internal const string ExpressionLexer_UnterminatedStringLiteral = "ExpressionLexer_UnterminatedStringLiteral";
- internal const string ExpressionLexer_InvalidCharacter = "ExpressionLexer_InvalidCharacter";
- internal const string ExpressionLexer_SyntaxError = "ExpressionLexer_SyntaxError";
- internal const string ExpressionLexer_UnterminatedLiteral = "ExpressionLexer_UnterminatedLiteral";
- internal const string ExpressionLexer_DigitExpected = "ExpressionLexer_DigitExpected";
- internal const string ExpressionLexer_UnbalancedBracketExpression = "ExpressionLexer_UnbalancedBracketExpression";
- internal const string ExpressionLexer_InvalidNumericString = "ExpressionLexer_InvalidNumericString";
- internal const string ExpressionLexer_InvalidEscapeSequence = "ExpressionLexer_InvalidEscapeSequence";
- internal const string UriQueryExpressionParser_UnrecognizedLiteral = "UriQueryExpressionParser_UnrecognizedLiteral";
- internal const string UriQueryExpressionParser_UnrecognizedLiteralWithReason = "UriQueryExpressionParser_UnrecognizedLiteralWithReason";
- internal const string UriPrimitiveTypeParsers_FailedToParseTextToPrimitiveValue = "UriPrimitiveTypeParsers_FailedToParseTextToPrimitiveValue";
- internal const string UriPrimitiveTypeParsers_FailedToParseStringToGeography = "UriPrimitiveTypeParsers_FailedToParseStringToGeography";
- internal const string UriCustomTypeParsers_AddCustomUriTypeParserAlreadyExists = "UriCustomTypeParsers_AddCustomUriTypeParserAlreadyExists";
- internal const string UriCustomTypeParsers_AddCustomUriTypeParserEdmTypeExists = "UriCustomTypeParsers_AddCustomUriTypeParserEdmTypeExists";
- internal const string UriParserHelper_InvalidPrefixLiteral = "UriParserHelper_InvalidPrefixLiteral";
- internal const string CustomUriTypePrefixLiterals_AddCustomUriTypePrefixLiteralAlreadyExists = "CustomUriTypePrefixLiterals_AddCustomUriTypePrefixLiteralAlreadyExists";
- internal const string ValueParser_InvalidDuration = "ValueParser_InvalidDuration";
- internal const string PlatformHelper_DateTimeOffsetMustContainTimeZone = "PlatformHelper_DateTimeOffsetMustContainTimeZone";
- internal const string JsonReader_UnexpectedComma = "JsonReader_UnexpectedComma";
- internal const string JsonReader_ArrayClosureMismatch = "JsonReader_ArrayClosureMismatch";
- internal const string JsonReader_MultipleTopLevelValues = "JsonReader_MultipleTopLevelValues";
- internal const string JsonReader_EndOfInputWithOpenScope = "JsonReader_EndOfInputWithOpenScope";
- internal const string JsonReader_UnexpectedToken = "JsonReader_UnexpectedToken";
- internal const string JsonReader_UnrecognizedToken = "JsonReader_UnrecognizedToken";
- internal const string JsonReader_MissingColon = "JsonReader_MissingColon";
- internal const string JsonReader_UnrecognizedEscapeSequence = "JsonReader_UnrecognizedEscapeSequence";
- internal const string JsonReader_UnexpectedEndOfString = "JsonReader_UnexpectedEndOfString";
- internal const string JsonReader_InvalidNumberFormat = "JsonReader_InvalidNumberFormat";
- internal const string JsonReader_InvalidBinaryFormat = "JsonReader_InvalidBinaryFormat";
- internal const string JsonReader_MissingComma = "JsonReader_MissingComma";
- internal const string JsonReader_InvalidPropertyNameOrUnexpectedComma = "JsonReader_InvalidPropertyNameOrUnexpectedComma";
- internal const string JsonReader_MaxBufferReached = "JsonReader_MaxBufferReached";
- internal const string JsonReader_CannotAccessValueInStreamState = "JsonReader_CannotAccessValueInStreamState";
- internal const string JsonReader_CannotCallReadInStreamState = "JsonReader_CannotCallReadInStreamState";
- internal const string JsonReader_CannotCreateReadStream = "JsonReader_CannotCreateReadStream";
- internal const string JsonReader_CannotCreateTextReader = "JsonReader_CannotCreateTextReader";
- internal const string JsonReaderExtensions_UnexpectedNodeDetected = "JsonReaderExtensions_UnexpectedNodeDetected";
- internal const string JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName = "JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName";
- internal const string JsonReaderExtensions_CannotReadPropertyValueAsString = "JsonReaderExtensions_CannotReadPropertyValueAsString";
- internal const string JsonReaderExtensions_CannotReadValueAsString = "JsonReaderExtensions_CannotReadValueAsString";
- internal const string JsonReaderExtensions_CannotReadValueAsDouble = "JsonReaderExtensions_CannotReadValueAsDouble";
- internal const string JsonReaderExtensions_UnexpectedInstanceAnnotationName = "JsonReaderExtensions_UnexpectedInstanceAnnotationName";
- internal const string BufferUtils_InvalidBufferOrSize = "BufferUtils_InvalidBufferOrSize";
- internal const string ServiceProviderExtensions_NoServiceRegistered = "ServiceProviderExtensions_NoServiceRegistered";
- internal const string TypeUtils_TypeNameIsNotQualified = "TypeUtils_TypeNameIsNotQualified";
-
- static TextRes loader = null;
- ResourceManager resources;
-
- internal TextRes()
- {
- resources = new System.Resources.ResourceManager("Microsoft.OData.Core", this.GetType().GetTypeInfo().Assembly);
- }
-
- private static TextRes GetLoader()
- {
- if (loader == null)
- {
- TextRes sr = new TextRes();
- Interlocked.CompareExchange(ref loader, sr, null);
- }
-
- return loader;
- }
-
- private static CultureInfo Culture
- {
- get { return null/*use ResourceManager default, CultureInfo.CurrentUICulture*/; }
- }
-
- public static ResourceManager Resources
- {
- get
- {
- return GetLoader().resources;
- }
- }
-
- public static string GetString(string name, params object[] args)
- {
- TextRes sys = GetLoader();
- if (sys == null)
- {
- return null;
- }
-
- string res = sys.resources.GetString(name, TextRes.Culture);
-
- if (args != null && args.Length > 0)
- {
- for (int i = 0; i < args.Length; i ++)
- {
- String value = args[i] as String;
- if (value != null && value.Length > 1024)
- {
- args[i] = value.Substring(0, 1024 - 3) + "...";
- }
- }
- return String.Format(CultureInfo.CurrentCulture, res, args);
- }
- else
- {
- return res;
- }
- }
-
- public static string GetString(string name)
- {
- TextRes sys = GetLoader();
- if (sys == null)
- {
- return null;
- }
-
- return sys.resources.GetString(name, TextRes.Culture);
- }
-
- public static string GetString(string name, out bool usedFallback)
- {
- // always false for this version of gensr
- usedFallback = false;
- return GetString(name);
- }
- }
-}
diff --git a/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj b/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj
index feedf238a3..b212de9b6b 100644
--- a/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj
+++ b/src/Microsoft.OData.Core/Microsoft.OData.Core.csproj
@@ -19,19 +19,6 @@
$(WarningsAsErrors);RS0017;RS0025
-
-
- Microsoft.OData.Core
- true
- true
- internal
- true
- Microsoft.OData.Core.TextRes
- false
- true
-
-
-
@@ -40,11 +27,6 @@
-
-
-
-
-
@@ -77,17 +59,6 @@
-
-
-
- TextTemplatingFileGenerator
- Microsoft.OData.Core.cs
-
-
- TextTemplatingFileGenerator
- Parameterized.Microsoft.OData.Core.cs
-
-
@@ -100,4 +71,19 @@
+
+
+ True
+ True
+ SRResources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ SRResources.Designer.cs
+
+
+
diff --git a/src/Microsoft.OData.Core/Microsoft.OData.Core.tt b/src/Microsoft.OData.Core/Microsoft.OData.Core.tt
deleted file mode 100644
index 313734bd13..0000000000
--- a/src/Microsoft.OData.Core/Microsoft.OData.Core.tt
+++ /dev/null
@@ -1,19 +0,0 @@
-<#@ include file="..\..\tools\StringResourceGenerator\ResourceClassGenerator2.ttinclude" #>
-<#+
-public static class Configuration
-{
- // The namespace where the generated resource classes reside.
- public const string ResourceClassNamespace = "Microsoft.OData";
-
- // The assembly name where the generated resource classes will be linked.
- public const string AssemblyName = "Microsoft.OData.Core";
-
- // The name of the generated resource class.
- public const string ResourceClassName = "TextRes";
-
- // The list of text files containing all the string resources.
- public static readonly string[] TextFiles = {
- "Microsoft.OData.Core.txt"
- };
-}
-#>
\ No newline at end of file
diff --git a/src/Microsoft.OData.Core/Microsoft.OData.Core.txt b/src/Microsoft.OData.Core/Microsoft.OData.Core.txt
deleted file mode 100644
index 06eb12826f..0000000000
--- a/src/Microsoft.OData.Core/Microsoft.OData.Core.txt
+++ /dev/null
@@ -1,1000 +0,0 @@
-
-; NOTE: don't use \", use ' instead
-; NOTE: don't use #, use ; instead for comments
-; NOTE: leave the [strings] alone
-; See ResourceManager documentation and the ResGen tool.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Error Messages
-
-ExceptionUtils_ArgumentStringEmpty=Value cannot be empty.
-
-ODataRequestMessage_AsyncNotAvailable=An asynchronous operation was requested on an IODataRequestMessage instance. For asynchronous operations to succeed, the request message instance must implement IODataRequestMessageAsync.
-ODataRequestMessage_StreamTaskIsNull=The IODataRequestMessageAsync.GetStreamAsync method returned null. An asynchronous method that returns a task can never return null.
-ODataRequestMessage_MessageStreamIsNull=The IODataRequestMessage.GetStream or IODataRequestMessageAsync.GetStreamAsync method returned a null stream value. The message can never return a null stream.
-ODataResponseMessage_AsyncNotAvailable=An asynchronous operation was requested on an IODataResponseMessage instance. For asynchronous operations to succeed, the response message instance must implement IODataResponseMessageAsync.
-ODataResponseMessage_StreamTaskIsNull=The IODataResponseMessageAsync.GetStreamAsync method returned null. An asynchronous method that returns a task can never return null.
-ODataResponseMessage_MessageStreamIsNull=The IODataResponseMessage.GetStream or IODataResponseMessageAsync.GetStreamAsync method returned a null stream value. The message can never return a null stream.
-
-AsyncBufferedStream_WriterDisposedWithoutFlush=A writer or stream has been disposed with data still in the buffer. You must call Flush or FlushAsync before calling Dispose when some data has already been written.
-
-ODataOutputContext_UnsupportedPayloadKindForFormat=The format '{0}' does not support writing a payload of kind '{1}'.
-
-ODataInputContext_UnsupportedPayloadKindForFormat=The format '{0}' does not support reading a payload of kind '{1}'.
-
-ODataOutputContext_MetadataDocumentUriMissing=The ServiceRoot property in ODataMessageWriterSettings.ODataUri must be set when writing a payload.
-
-ODataJsonSerializer_RelativeUriUsedWithoutMetadataDocumentUriOrMetadata=A relative URI value '{0}' was specified in the data to write, but the metadata document URI or the metadata for the item to be written was not specified for the writer. The metadata document URI and the metadata for the item to be written must be provided to the writer when using relative URI values.
-
-ODataWriter_RelativeUriUsedWithoutBaseUriSpecified=A relative URI value '{0}' was specified in the data to write, but a base URI was not specified for the writer. A base URI must be set when using relative URI values.
-ODataWriter_StreamPropertiesMustBePropertiesOfODataResource=The property '{0}' is a stream property, but it is not a property of an ODataResource instance. In OData, stream properties must be properties of ODataResource instances.
-
-ODataWriterCore_InvalidStateTransition=An invalid state transition has been detected in an OData writer. Cannot transition from state '{0}' to state '{1}'.
-ODataWriterCore_InvalidTransitionFromStart=Cannot transition from state '{0}' to state '{1}'. The only valid actions in state '{0}' are to write a resource or a resource set.
-ODataWriterCore_InvalidTransitionFromResource=Cannot transition from state '{0}' to state '{1}'. The only valid action in state '{0}' is to write a property or a nested resource.
-ODataWriterCore_InvalidTransitionFrom40DeletedResource=Cannot transition from state '{0}' to state '{1}' when writing an OData 4.0 payload. To write content to a deleted resource, please specify ODataVersion 4.01 or greater in MessageWriterSettings.
-ODataWriterCore_InvalidTransitionFromNullResource=Cannot transition from state '{0}' to state '{1}'. You must first call ODataWriter.WriteEnd to finish writing a null ODataResource.
-ODataWriterCore_InvalidTransitionFromResourceSet=Cannot transition from state '{0}' to state '{1}'. The only valid action in state '{0}' is to write a resource.
-ODataWriterCore_InvalidTransitionFromExpandedLink=Cannot transition from state '{0}' to state '{1}'. The only valid actions in state '{0}' are to write a resource or a resource set.
-ODataWriterCore_InvalidTransitionFromCompleted=Cannot transition from state '{0}' to state '{1}'. Nothing further can be written once the writer has completed.
-ODataWriterCore_InvalidTransitionFromError=Cannot transition from state '{0}' to state '{1}'. Nothing can be written once the writer entered the error state.
-ODataJsonDeltaWriter_InvalidTransitionFromNestedResource=Cannot transition from state '{0}' to state '{1}'. State transition is not allowed while writing an expanded navigation property, complex property or complex collection property.
-ODataJsonDeltaWriter_InvalidTransitionToNestedResource=Cannot transition from state '{0}' to state '{1}'. Nested resource can only be written within a delta resource.
-ODataJsonDeltaWriter_WriteStartExpandedResourceSetCalledInInvalidState=WriteStart(expandedResourceSet) was called in an invalid state ('{0}'); WriteStart(expandedResourceSet) is only supported in state 'ExpandedNavigationProperty'.
-ODataWriterCore_WriteEndCalledInInvalidState=ODataWriter.WriteEnd was called in an invalid state ('{0}'); WriteEnd is only supported in states 'Resource', 'ResourceSet', 'NavigationLink', and 'NavigationLinkWithContent'.
-ODataWriterCore_StreamNotDisposed=ODataWriter.Write or ODataWriter.WriteEnd was called while streaming a value. Stream or TextWriter must be disposed before calling additional methods on ODataWriter.
-
-ODataWriterCore_DeltaResourceWithoutIdOrKeyProperties=No Id or key properties were found. A resource in a delta payload requires an ID or key properties be specified.
-ODataWriterCore_QueryCountInRequest=The ODataResourceSet.Count must be null for request payloads. Query counts are only supported in responses.
-ODataWriterCore_QueryNextLinkInRequest=The NextPageLink must be null for request payloads. Next page links are only supported in responses.
-ODataWriterCore_QueryDeltaLinkInRequest=The DeltaLink must be null for request payloads. Delta links are only supported in responses.
-ODataWriterCore_CannotWriteDeltaWithResourceSetWriter=Cannot write a deleted resource, link, deleted link, or nested delta resource set within a resource set; they must be written within a delta resource set.
-ODataWriterCore_NestedContentNotAllowedIn40DeletedEntry=Nested content is not allowed in an OData 4.0 deleted entry. For content in deleted entries, please specify OData 4.01 or greater.
-ODataWriterCore_CannotWriteTopLevelResourceSetWithResourceWriter=Cannot write a top-level resource set with a writer that was created to write a top-level resource.
-ODataWriterCore_CannotWriteTopLevelResourceWithResourceSetWriter=Cannot write a top-level resource with a writer that was created to write a top-level resource set.
-ODataWriterCore_SyncCallOnAsyncWriter=A synchronous operation was called on an asynchronous writer. Calls on a writer instance must be either all synchronous or all asynchronous.
-ODataWriterCore_AsyncCallOnSyncWriter=An asynchronous operation was called on a synchronous writer. Calls on a writer instance must be either all synchronous or all asynchronous.
-ODataWriterCore_EntityReferenceLinkWithoutNavigationLink=An entity reference link was written without a surrounding navigation link. The WriteEntityReferenceLink or WriteEntityReferenceLinkAsync methods can only be used when writing the content of a navigation link.
-ODataWriterCore_DeferredLinkInRequest=A deferred link was written into a request. In requests, each nested resource info must have a resource set, resource, or entity reference link written into it.
-ODataWriterCore_MultipleItemsInNestedResourceInfoWithContent=More than one item was written into the content of a nested resource. In OData, a nested resource can only contain more than one item in its content when ODataNestedResourceInfo.IsCollection set to true, and the writer is writing a request.
-ODataWriterCore_DeltaLinkNotSupportedOnExpandedResourceSet=The ODataResourceSet.DeltaLink property must be null for expanded resource sets. Delta link is not supported on expanded resource sets.
-ODataWriterCore_PathInODataUriMustBeSetWhenWritingContainedElement=The Path property in ODataMessageWriterSettings.ODataUri must be set when writing contained elements.
-
-DuplicatePropertyNamesNotAllowed=Multiple properties with the name '{0}' were detected in a resource or a complex value. In OData, duplicate property names are not allowed.
-DuplicateAnnotationNotAllowed=Multiple annotations with the name '{0}' were detected. In OData, duplicate annotations are not allowed.
-DuplicateAnnotationForPropertyNotAllowed=Multiple annotations with the name '{0}' were detected for the property with name '{1}'. In OData, duplicate annotations are not allowed.
-DuplicateAnnotationForInstanceAnnotationNotAllowed=Multiple annotations with the name '{0}' were detected for the instance annotation with name '{1}'. In OData, duplicate annotations are not allowed.
-PropertyAnnotationAfterTheProperty=An annotation with name '{0}' for property '{1}' was detected after the property, or after an annotation for another property. In OData, annotations for a property must be in a single group and must appear before the property they annotate.
-
-ValueUtils_CannotConvertValueToPrimitive=Cannot convert a value of type '{0}' to the string representation of a primitive value.
-
-ODataJsonWriter_UnsupportedValueType=The value of type '{0}' is not supported and cannot be converted to a JSON representation.
-ODataJsonWriter_UnsupportedValueInCollection=Unable to serialize an object in a collection as it is not a supported ODataValue.
-ODataJsonWriter_UnsupportedDateTimeFormat=The specified ODataJsonDateTimeFormat is not supported.
-
-ODataException_GeneralError=An error occurred while processing the OData message.
-ODataErrorException_GeneralError=An error was read from the payload. See the 'Error' property for more details.
-ODataUriParserException_GeneralError=An error occurred while parsing part of the URI.
-
-ODataUrlValidationError_SelectRequired='{0}' is missing a $select clause. All property paths, expands, and selects of complex types should include a $select statement.
-ODataUrlValidationError_InvalidRule=Exception thrown by invalid rule {0}. {1}
-
-ODataMessageWriter_WriterAlreadyUsed=The ODataMessageWriter has already been used to write a message payload. An ODataMessageWriter can only be used once to write a payload for a given message.
-ODataMessageWriter_EntityReferenceLinksInRequestNotAllowed=Top-level entity reference link collection payloads are not allowed in requests.
-ODataMessageWriter_ErrorPayloadInRequest=An error cannot be written to a request payload. Errors are only supported in responses.
-ODataMessageWriter_ServiceDocumentInRequest=A service document cannot be written to request payloads. Service documents are only supported in responses.
-ODataMessageWriter_MetadataDocumentInRequest=A metadata document cannot be written to request payloads. Metadata documents are only supported in responses.
-ODataMessageWriter_DeltaInRequest=Cannot write delta in request payload.
-ODataMessageWriter_AsyncInRequest=Cannot write async in request payload.
-ODataMessageWriter_CannotWriteTopLevelNull=Cannot write the value 'null' in top level property; return 204 instead.
-ODataMessageWriter_CannotWriteNullInRawFormat=Cannot write the value 'null' in raw format.
-ODataMessageWriter_CannotSetHeadersWithInvalidPayloadKind=Cannot set message headers for the invalid payload kind '{0}'.
-ODataMessageWriter_IncompatiblePayloadKinds=The payload kind '{0}' used in the last call to ODataUtils.SetHeadersForPayload is incompatible with the payload being written, which is of kind '{1}'.
-ODataMessageWriter_CannotWriteStreamPropertyAsTopLevelProperty=The stream property '{0}' cannot be written to the payload as a top level property.
-ODataMessageWriter_WriteErrorAlreadyCalled=The WriteError method or the WriteErrorAsync method on the ODataMessageWriter has already been called to write an error payload. Only a single error payload can be written with each ODataMessageWriter instance.
-ODataMessageWriter_CannotWriteInStreamErrorForRawValues=The WriteError method or the WriteErrorAsync method on ODataMessageWriter cannot be called after the WriteValue method or the WriteValueAsync method is called. In OData, writing an in-stream error for raw values is not supported.
-ODataMessageWriter_CannotWriteMetadataWithoutModel=No model was specified in the ODataMessageWriterSettings; a model has to be provided in the ODataMessageWriterSettings in order to write a metadata document.
-ODataMessageWriter_CannotSpecifyOperationWithoutModel=No model was specified in the ODataMessageWriterSettings; a model has to be provided in the ODataMessageWriterSettings when CreateODataParameterWriter is called with a non-null operation.
-ODataMessageWriter_JsonPaddingOnInvalidContentType=A JsonPaddingFunctionName was specified, but the content-type '{0}' is not supported with Json Padding.
-ODataMessageWriter_NonCollectionType=The type '{0}' specified as the collection's item type is not primitive, enum or complex. An ODataCollectionWriter can only write collections of primitive, enum or complex values.
-ODataMessageWriter_NotAllowedWriteTopLevelPropertyWithResourceValue=Not allowed to write top level property '{0}' with 'ODataResourceValue' or collection of resource value.
-ODataMessageWriter_JsonWriterFactory_ReturnedNull=The provided implementation of IJsonWriterFactory returned null for arguments: isIeee754Compatible '{0}', encoding '{1}'. The factory should return a concrete IJsonWriter implementation.
-ODataMessageWriter_Buffer_Maximum_Size_Exceeded=The requested buffer capacity {0} exceeds the max buffer size.
-ODataMessageWriterSettings_MessageWriterSettingsXmlCustomizationCallbacksMustBeSpecifiedBoth=Both startResourceXmlCustomizationCallback and endResourceXmlCustomizationCallback must be either null or non-null.
-
-
-ODataCollectionWriterCore_InvalidTransitionFromStart=Cannot transition from state '{0}' to state '{1}'. The only valid actions in state '{0}' are to write the collection or to write nothing at all.
-ODataCollectionWriterCore_InvalidTransitionFromCollection=Cannot transition from state '{0}' to state '{1}'. The only valid actions in state '{0}' are to write an item or to write the end of the collection.
-ODataCollectionWriterCore_InvalidTransitionFromItem=Cannot transition from state '{0}' to state '{1}'. The only valid actions in state '{0}' are to write an item or the end of the collection.
-ODataCollectionWriterCore_WriteEndCalledInInvalidState=ODataCollectionWriter.WriteEnd was called in an invalid state ('{0}'); WriteEnd is only supported in states 'Start', 'Collection', and 'Item'.
-ODataCollectionWriterCore_SyncCallOnAsyncWriter=A synchronous operation was called on an asynchronous collection writer. All calls on a collection writer instance must be either synchronous or asynchronous.
-ODataCollectionWriterCore_AsyncCallOnSyncWriter=An asynchronous operation was called on a synchronous collection writer. All calls on a collection writer instance must be either synchronous or asynchronous.
-
-ODataBatch_InvalidHttpMethodForChangeSetRequest=An invalid HTTP method '{0}' was detected for a request in a change set. Requests in change sets only support the HTTP methods 'POST', 'PUT', 'DELETE', and 'PATCH'.
-
-ODataBatchOperationHeaderDictionary_KeyNotFound=The header with name '{0}' was not present in the header collection of the batch operation.
-ODataBatchOperationHeaderDictionary_DuplicateCaseInsensitiveKeys=Multiple headers with names that match '{0}', when using a case insensitive comparison, have been added. When case-insensitive header names are used, at most one header can be added for each name.
-
-ODataParameterWriter_InStreamErrorNotSupported=Writing an in-stream error is not supported when writing a parameter payload.
-ODataParameterWriter_CannotCreateParameterWriterOnResponseMessage=CreateParameterWriter was called on a response message. A parameter payload is only allowed in a request message.
-
-ODataParameterWriterCore_SyncCallOnAsyncWriter=A synchronous operation was called on an asynchronous parameter writer. All calls on a parameter writer instance must be either synchronous or asynchronous.
-ODataParameterWriterCore_AsyncCallOnSyncWriter=An asynchronous operation was called on a synchronous parameter writer. All calls on a parameter writer instance must be either synchronous or asynchronous.
-ODataParameterWriterCore_CannotWriteStart=WriteStart can only be called once, and it must be called before writing anything else.
-ODataParameterWriterCore_CannotWriteParameter=WriteValue and CreateCollectionWriter can only be called after WriteStart and before WriteEnd; they cannot be called until the previously created sub-writer is completed.
-ODataParameterWriterCore_CannotWriteEnd=WriteEnd can only be called after WriteStart and after the previously created sub-writer has completed.
-ODataParameterWriterCore_CannotWriteInErrorOrCompletedState=The writer is in either the 'Error' or 'Completed' state. No further writes can be performed on this writer.
-ODataParameterWriterCore_DuplicatedParameterNameNotAllowed=The parameter '{0}' has already been written. Duplicate parameter names are not allowed in the parameter payload.
-ODataParameterWriterCore_CannotWriteValueOnNonValueTypeKind=The parameter '{0}' is of Edm type kind '{1}'. You cannot call WriteValue on a parameter that is not of Edm type kinds 'Primitive' or 'Enum'.
-ODataParameterWriterCore_CannotWriteValueOnNonSupportedValueType=The value for parameter '{0}' is of type '{1}'. WriteValue can only write null, ODataEnumValue and primitive types that are not Stream type.
-ODataParameterWriterCore_CannotCreateCollectionWriterOnNonCollectionTypeKind=The parameter '{0}' is of Edm type kind '{1}'. You cannot call CreateCollectionWriter on a parameter that is not of Edm type kind 'Collection'.
-ODataParameterWriterCore_CannotCreateResourceWriterOnNonEntityOrComplexTypeKind=The parameter '{0}' is of Edm type kind '{1}'. You cannot call CreateResourceWriter on a parameter that is not of Edm type kind 'Entity' or 'Complex'.
-ODataParameterWriterCore_CannotCreateResourceSetWriterOnNonStructuredCollectionTypeKind=The parameter '{0}' is of Edm type kind '{1}'. You cannot call CreateResourceSetWriter on a parameter that is not of Edm type kind 'Collection(Entity)' or 'Collection(Complex)'.
-ODataParameterWriterCore_ParameterNameNotFoundInOperation=The name '{0}' is not a recognized parameter name for operation '{1}'.
-ODataParameterWriterCore_MissingParameterInParameterPayload=The parameters {0} of the operation '{1}' could not be found when writing the parameter payload. All parameters present in the operation must be written to the parameter payload.
-
-ODataBatchWriter_FlushOrFlushAsyncCalledInStreamRequestedState=ODataBatchWriter.Flush or ODataBatchWriter.FlushAsync was called while a stream being used to write operation content, obtained from the operation message by using GetStream or GetStreamAsync, was still active. This is not allowed. ODataBatchWriter.Flush or ODataBatchWriter.FlushAsync can only be called when an active stream for the operation content does not exist.
-ODataBatchWriter_CannotCompleteBatchWithActiveChangeSet=An invalid method call on ODataBatchWriter was detected. You cannot call ODataBatchWriter.WriteEndBatch with an active change set; you must first call ODataBatchWriter.WriteEndChangeset.
-ODataBatchWriter_CannotStartChangeSetWithActiveChangeSet=An invalid method call on ODataBatchWriter was detected. You cannot call ODataBatchWriter.WriteStartChangeset with an active change set; you must first call ODataBatchWriter.WriteEndChangeset.
-ODataBatchWriter_CannotCompleteChangeSetWithoutActiveChangeSet=An invalid method call on ODataBatchWriter was detected. You cannot call ODataBatchWriter.WriteEndChangeset without an active change set; you must first call ODataBatchWriter.WriteStartChangeset.
-ODataBatchWriter_InvalidTransitionFromStart=An invalid method call on ODataBatchWriter was detected. After creating the writer, the only valid methods are ODataBatchWriter.WriteStartBatch and ODataBatchWriter.FlushAsync.
-ODataBatchWriter_InvalidTransitionFromBatchStarted=An invalid method call on ODataBatchWriter was detected. After calling WriteStartBatch, the only valid methods on ODataBatchWriter are WriteStartChangeset, CreateOperationRequestMessage, CreateOperationResponseMessage, WriteEndBatch, and FlushAsync.
-ODataBatchWriter_InvalidTransitionFromChangeSetStarted=An invalid method call on ODataBatchWriter was detected. After calling WriteStartChangeset, the only valid methods on ODataBatchWriter are CreateOperationRequestMessage, CreateOperationResponseMessage, WriteEndChangeset, and FlushAsync.
-ODataBatchWriter_InvalidTransitionFromOperationCreated=An invalid method call on ODataBatchWriter was detected. After calling CreateOperationRequestMessage or CreateOperationResponseMessage, the only valid methods on ODataBatchWriter are WriteStartChangeset, WriteEndChangeset, WriteEndBatch, and FlushAsync.
-ODataBatchWriter_InvalidTransitionFromOperationContentStreamRequested=An invalid method call on ODataBatchWriter was detected. You cannot use the batch writer while another writer is writing the content of an operation. Dispose the stream for the operation before continuing to use the ODataBatchWriter.
-ODataBatchWriter_InvalidTransitionFromOperationContentStreamDisposed=An invalid method call on ODataBatchWriter was detected. After writing the content of an operation, the only valid methods on ODataBatchWriter are CreateOperationRequestMessage, CreateOperationResponseMessage, WriteStartChangeset, WriteEndChangeset, WriteEndBatch and FlushAsync.
-ODataBatchWriter_InvalidTransitionFromChangeSetCompleted=An invalid method call on ODataBatchWriter was detected. After calling WriteEndChangeset, the only valid methods on ODataBatchWriter are CreateOperationRequestMessage, CreateOperationResponseMessage, WriteStartChangeset, WriteEndBatch, and FlushAsync.
-ODataBatchWriter_InvalidTransitionFromBatchCompleted=An invalid method call on ODataBatchWriter was detected. You can only call ODataBatchWriter.FlushAsync after ODataBatchWriter.WriteEndBatch has been called.
-ODataBatchWriter_CannotCreateRequestOperationWhenWritingResponse=When writing a batch response, you cannot create a batch operation request message.
-ODataBatchWriter_CannotCreateResponseOperationWhenWritingRequest=When writing a batch request, you cannot create a batch operation response message.
-ODataBatchWriter_MaxBatchSizeExceeded=The current batch message contains too many parts. Only batch messages with a maximum number of '{0}' query operations and change sets are allowed.
-ODataBatchWriter_MaxChangeSetSizeExceeded=The current change set contains too many operations. Only change sets with a maximum number of '{0}' operations are allowed.
-ODataBatchWriter_SyncCallOnAsyncWriter=A synchronous operation was called on an asynchronous batch writer. Calls on a batch writer instance must be either all synchronous or all asynchronous.
-ODataBatchWriter_AsyncCallOnSyncWriter=An asynchronous operation was called on a synchronous batch writer. Calls on a batch writer instance must be either all synchronous or all asynchronous.
-ODataBatchWriter_DuplicateContentIDsNotAllowed=The content ID '{0}' was found more than once in the same change set or same batch request. Content IDs have to be unique across all operations of a change set for OData V4.0 and have to be unique across all operations in the whole batch request for OData V4.01.
-ODataBatchWriter_CannotWriteInStreamErrorForBatch=The WriteError and WriteErrorAsync methods on ODataMessageWriter cannot be called when a batch is being written by using ODataBatchWriter. In OData, writing an in-stream error for a batch payload is not supported.
-
-ODataBatchUtils_RelativeUriUsedWithoutBaseUriSpecified=The relative URI '{0}' was specified in a batch operation, but a base URI was not specified for the batch writer or batch reader.
-ODataBatchUtils_RelativeUriStartingWithDollarUsedWithoutBaseUriSpecified=The relative URI '{0}' was specified in a batch operation, but a base URI was not specified for the batch writer or batch reader. When the relative URI is a reference to a content ID, the content ID does not exist in the current change set.
-
-ODataBatchOperationMessage_VerifyNotCompleted=An attempt to change the properties of the message or to retrieve the payload stream for the message has failed. Either the payload stream has already been requested or the processing of the message has been completed. In both cases, no more changes can be made to the message.
-
-ODataBatchOperationStream_Disposed=Cannot access a closed stream.
-
-ODataBatchReader_CannotCreateRequestOperationWhenReadingResponse=When reading a batch response, you cannot create a batch operation request message.
-ODataBatchReader_CannotCreateResponseOperationWhenReadingRequest=When reading a batch request, you cannot create a batch operation response message.
-ODataBatchReader_InvalidStateForCreateOperationRequestMessage=The method CreateOperationRequestMessage was called in state '{0}', which is not allowed. CreateOperationRequestMessage can only be called in state 'Operation'.
-ODataBatchReader_OperationRequestMessageAlreadyCreated=A request message for the operation has already been created. You cannot create a request message for the same operation multiple times.
-ODataBatchReader_OperationResponseMessageAlreadyCreated=A response message for the operation has already been created. You cannot create a response message for the same operation multiple times.
-ODataBatchReader_InvalidStateForCreateOperationResponseMessage=The method CreateOperationResponseMessage was called in state '{0}', which is not allowed. CreateOperationResponseMessage can only be called in state 'Operation'.
-ODataBatchReader_CannotUseReaderWhileOperationStreamActive=You cannot use a batch reader while the stream for the content of an operation is still active. You must first dispose the operation stream before further calls to the batch reader are made.
-ODataBatchReader_SyncCallOnAsyncReader=A synchronous operation was called on an asynchronous batch reader. Calls on a batch reader instance must be either all synchronous or all asynchronous.
-ODataBatchReader_AsyncCallOnSyncReader=An asynchronous operation was called on a synchronous batch reader. Calls on a batch reader instance must be either all synchronous or all asynchronous.
-ODataBatchReader_ReadOrReadAsyncCalledInInvalidState=ODataBatchReader.ReadAsync or ODataBatchReader.Read was called in an invalid state. No further calls can be made to the reader in state '{0}'.
-ODataBatchReader_MaxBatchSizeExceeded=The current batch message contains too many parts. A maximum number of '{0}' query operations and change sets are allowed in a batch message.
-ODataBatchReader_MaxChangeSetSizeExceeded=The current change set contains too many operations. A maximum number of '{0}' operations are allowed in a change set.
-ODataBatchReader_NoMessageWasCreatedForOperation=An operation was detected, but no message was created for it. You must create a message for every operation found in a batch or change set.
-ODataBatchReader_ReaderModeNotInitilized=Reader mode is not setup correctly.
-ODataBatchReader_JsonBatchTopLevelPropertyMissing=Json batch format requires top level property name 'requests' or 'response' but it is missing.
-ODataBatchReader_DuplicateContentIDsNotAllowed=The content ID '{0}' was found more than once in the same change set or same batch request. Content IDs have to be unique across all operations of a change set for OData V4.0 and have to be unique across all operations in the whole batch request for OData V4.01.
-ODataBatchReader_DuplicateAtomicityGroupIDsNotAllowed=The atomicityGroup ID [{0}] was found duplicated in the batch request. AtomicityGroup IDs have to be adjacent, otherwise would be detected as duplicated.
-ODataBatchReader_RequestPropertyMissing=Request property [{0}] is required but is missing.
-ODataBatchReader_SameRequestIdAsAtomicityGroupIdNotAllowed=The dependsOn request Id [{0}] is same as atomicityGroup property value [{1}], and is not allowed.
-ODataBatchReader_SelfReferenceDependsOnRequestIdNotAllowed=The dependsOn request Id [{0}] is same as id property value [{1}], and it is not allowed.
-ODataBatchReader_DependsOnRequestIdIsPartOfAtomicityGroupNotAllowed=The dependsOn request Id [{0}] is part of atomic group [{1}]. Therefore dependsOn property should refer to atomic group Id [{1}] instead.
-ODataBatchReader_DependsOnIdNotFound=The dependsOn Id: [{0}] in request [{1}] is not matching any of the request Id and atomic group Id seen so far. Forward reference is not allowed.
-ODataBatchReader_AbsoluteURINotMatchingBaseUri=Absolute URI {0} is not start with the base URI [{1}] specified by the operation message.
-ODataBatchReader_ReferenceIdNotIncludedInDependsOn=Request Id reference [{0}] in Uri [{1}] is not found in effective depends-on-Ids [{2}] of the request.
-ODataBatch_GroupIdOrChangeSetIdCannotBeNull=Group id or changeset GUID cannot be null.
-ODataBatchReader_MessageIdPositionedIncorrectly=Message with id [{0}] is positioned incorrectly: all messages of same groupId [{1}] must be adjacent.
-ODataBatchReader_ReaderStreamChangesetBoundaryCannotBeNull=Changeset boundary must have been set by now.
-
-ODataBatchReaderStream_InvalidHeaderSpecified=The message header '{0}' is invalid. The header value must be of the format ': '.
-ODataBatchReaderStream_InvalidRequestLine=The request line '{0}' is invalid. The request line at the start of each operation must be of the format 'HttpMethod RequestUrl HttpVersion'.
-ODataBatchReaderStream_InvalidResponseLine=The response line '{0}' is invalid. The response line at the start of each operation must be of the format 'HttpVersion StatusCode StatusCodeString'.
-ODataBatchReaderStream_InvalidHttpVersionSpecified=The HTTP version '{0}' used in a batch operation request or response is not valid. The value must be '{1}'.
-ODataBatchReaderStream_NonIntegerHttpStatusCode= The HTTP status code '{0}' is invalid. An HTTP status code must be an integer value.
-ODataBatchReaderStream_MissingContentTypeHeader=The 'Content-Type' header is missing. The 'Content-Type' header must be specified for each MIME part of a batch message.
-ODataBatchReaderStream_MissingOrInvalidContentEncodingHeader=A missing or invalid '{0}' header was found. The '{0}' header must be specified for each batch operation, and its value must be '{1}'.
-ODataBatchReaderStream_InvalidContentTypeSpecified=The '{0}' header value '{1}' is invalid. When this is the start of the change set, the value must be '{2}'; otherwise it must be '{3}'.
-ODataBatchReaderStream_InvalidContentLengthSpecified=The content length header '{0}' is not valid. The content length header must be a valid Int32 literal and must be greater than or equal to 0.
-ODataBatchReaderStream_DuplicateHeaderFound=The header '{0}' was specified multiple times. Each header must appear only once in a batch part.
-ODataBatchReaderStream_NestedChangesetsAreNotSupported=Nested change sets in a batch payload are not supported.
-ODataBatchReaderStream_MultiByteEncodingsNotSupported=Invalid multi-byte encoding '{0}' detected. Multi-byte encodings other than UTF-8 are only supported for operation payloads. They are not supported in batch or change set parts.
-ODataBatchReaderStream_UnexpectedEndOfInput=Encountered an unexpected end of input while reading the batch payload.
-
-ODataBatchReaderStreamBuffer_BoundaryLineSecurityLimitReached=Too many white spaces after a boundary delimiter and before the terminating line resource set. For security reasons, the total number of characters for a boundary including white spaces must not exceed {0}.
-
-ODataJsonBatchPayloadItemPropertiesCache_UnknownPropertyForMessageInBatch=Unknown property name '{0}' for message in batch.
-ODataJsonBatchPayloadItemPropertiesCache_DuplicatePropertyForRequestInBatch=Duplicate property name '{0}' for request in batch.
-ODataJsonBatchPayloadItemPropertiesCache_DuplicateHeaderForRequestInBatch=Duplicate header name '{0}' for request in batch.
-
-ODataJsonBatchBodyContentReaderStream_UnexpectedNodeType=Unexpected reader.NodeType: {0}.
-ODataJsonBatchBodyContentReaderStream_UnsupportedContentTypeInHeader=Unknown/undefined type, new type that needs to be supported: {0}?
-
-ODataAsyncWriter_CannotCreateResponseWhenNotWritingResponse=When not writing an async response, you cannot create an async response message.
-ODataAsyncWriter_CannotCreateResponseMoreThanOnce=You cannot create an async response message more than once.
-ODataAsyncWriter_SyncCallOnAsyncWriter=A synchronous operation was called on an asynchronous async writer. Calls on an async writer instance must be either all synchronous or all asynchronous.
-ODataAsyncWriter_AsyncCallOnSyncWriter=An asynchronous operation was called on a synchronous async writer. Calls on an async writer instance must be either all synchronous or all asynchronous.
-ODataAsyncWriter_CannotWriteInStreamErrorForAsync=The WriteError and WriteErrorAsync methods on ODataMessageWriter cannot be called when an async message is being written by using ODataAsyncWriter. In OData, writing an in-stream error for an async payload is not supported.
-
-ODataAsyncReader_InvalidHeaderSpecified=The message header '{0}' is invalid. The header value must be of the format ': '.
-ODataAsyncReader_CannotCreateResponseWhenNotReadingResponse=When not reading an async response, you cannot create an async response message.
-ODataAsyncReader_InvalidResponseLine=The response line '{0}' is invalid. The response line at the start of the async response must be of the format 'HttpVersion StatusCode StatusCodeString'.
-ODataAsyncReader_InvalidHttpVersionSpecified=The HTTP version '{0}' used in an async response is not valid. The value must be '{1}'.
-ODataAsyncReader_NonIntegerHttpStatusCode=The HTTP status code '{0}' is invalid. An HTTP status code must be an integer value.
-ODataAsyncReader_DuplicateHeaderFound=The header '{0}' was specified multiple times. Each header must appear only once.
-ODataAsyncReader_MultiByteEncodingsNotSupported=Invalid multi-byte encoding '{0}' detected. Multi-byte encodings other than UTF-8 are only supported for async payloads. They are not supported in batch or change set parts.
-ODataAsyncReader_InvalidNewLineEncountered=Invalid new line '{0}' encountered. Should be '\r\n'.
-ODataAsyncReader_UnexpectedEndOfInput=Encountered an unexpected end of input while reading the async payload. Could be due to calling CreateResponseMessage() more than once.
-ODataAsyncReader_SyncCallOnAsyncReader=A synchronous operation was called on an asynchronous async reader. Calls on an async reader instance must be either all synchronous or all asynchronous.
-ODataAsyncReader_AsyncCallOnSyncReader=An asynchronous operation was called on a synchronous async reader. Calls on an async reader instance must be either all synchronous or all asynchronous.
-
-HttpUtils_MediaTypeUnspecified=The MIME type '{0}' is invalid or unspecified.
-HttpUtils_MediaTypeRequiresSlash=The MIME type '{0}' requires a '/' character between type and subtype, such as 'text/plain'.
-HttpUtils_MediaTypeRequiresSubType=The MIME type '{0}' requires a subtype definition.
-HttpUtils_MediaTypeMissingParameterValue=The MIME type is missing a parameter value for a parameter with the name '{0}'.
-HttpUtils_MediaTypeMissingParameterName=The MIME type is missing a parameter name for a parameter definition.
-HttpUtils_EscapeCharWithoutQuotes=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because the escape character '{3}' is not inside a quoted-string.
-HttpUtils_EscapeCharAtEnd=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because it terminates with the escape character '{3}'. In a quoted-string, the escape characters must always be followed by a character.
-HttpUtils_ClosingQuoteNotFound=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because the closing quote character was not found for the quoted-string.
-HttpUtils_InvalidCharacterInQuotedParameterValue=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because the character '{3}' is not allowed in a quoted-string. For more information, see RFC 2616, Sections 3.6 and 2.2.
-HttpUtils_ContentTypeMissing=The value for the Content-Type header is missing.
-HttpUtils_MediaTypeRequiresSemicolonBeforeParameter=The MIME type '{0}' requires a semi-colon character (';') before a parameter definition.
-HttpUtils_InvalidQualityValueStartChar=An invalid quality value was detected in the header string '{0}'; quality values must start with '0' or '1' but not with '{1}'.
-HttpUtils_InvalidQualityValue=An invalid quality value '{0}' was detected in the header string '{1}'; quality values must be in the range [0, 1].
-HttpUtils_CannotConvertCharToInt=An error occurred when converting the character '{0}' to an integer.
-HttpUtils_MissingSeparatorBetweenCharsets=The separator ',' was missing between charset values in the header '{0}'.
-HttpUtils_InvalidSeparatorBetweenCharsets=A separator character was missing between charset values in the header '{0}'.
-HttpUtils_InvalidCharsetName=An invalid (empty) charset name found in the header '{0}'.
-HttpUtils_UnexpectedEndOfQValue=An unexpected end of the q-Value was detected in the header '{0}'.
-HttpUtils_ExpectedLiteralNotFoundInString=The expected literal '{0}' was not found at position '{1}' in the string '{2}'.
-HttpUtils_InvalidHttpMethodString=The string '{0}' cannot be converted into a supported HTTP method. The only supported HTTP methods are GET, DELETE, PUT, POST and PATCH.
-HttpUtils_NoOrMoreThanOneContentTypeSpecified=The specified content type '{0}' contains either no media type or more than one media type, which is not allowed. You must specify exactly one media type as the content type.
-
-HttpHeaderValueLexer_UnrecognizedSeparator=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because '{3}' is not a recognized separator. The supported separators are ',', ';', and '='.
-HttpHeaderValueLexer_TokenExpectedButFoundQuotedString=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because a token is expected but a quoted-string is found instead.
-HttpHeaderValueLexer_FailedToReadTokenOrQuotedString=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because a token or a quoted-string is expected at this position but were not found.
-HttpHeaderValueLexer_InvalidSeparatorAfterQuotedString=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because '{3}' is not a valid separator after a quoted-string.
-HttpHeaderValueLexer_EndOfFileAfterSeparator=An error occurred when parsing the HTTP header '{0}'. The header value '{1}' is incorrect at position '{2}' because the header value should not end with the separator '{3}'.
-
-MediaType_EncodingNotSupported=The character set '{0}' is not supported.
-
-MediaTypeUtils_DidNotFindMatchingMediaType=A supported MIME type could not be found that matches the acceptable MIME types for the request. The supported type(s) '{0}' do not match any of the acceptable MIME types '{1}'.
-MediaTypeUtils_CannotDetermineFormatFromContentType=A supported MIME type could not be found that matches the content type of the response. None of the supported type(s) '{0}' matches the content type '{1}'.
-MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified=The specified content type '{0}' contains either no media type or more than one media type, which is not allowed. You must specify exactly one media type as the content type.
-MediaTypeUtils_BoundaryMustBeSpecifiedForBatchPayloads=The content type '{0}' specifies a batch payload; however, the payload either does not include a batch boundary or includes more than one boundary. In OData, batch payload content types must specify exactly one batch boundary in the '{1}' parameter of the content type.
-
-ExpressionLexer_ExpectedLiteralToken=Expected literal type token but found token '{0}'.
-
-
-ODataUriUtils_ConvertToUriLiteralUnsupportedType=The type '{0}' is not supported when converting to a URI literal.
-ODataUriUtils_ConvertFromUriLiteralTypeRefWithoutModel=An IEdmTypeReference must be provided with a matching IEdmModel. No model was provided.
-ODataUriUtils_ConvertFromUriLiteralOverflowNumber=The overflow exception caught for expected type '{0}'. '{1}'.
-ODataUriUtils_ConvertFromUriLiteralTypeVerificationFailure=Type verification failed. Expected type '{0}' but received the value '{1}'.
-ODataUriUtils_ConvertFromUriLiteralNullTypeVerificationFailure=Type verification failed. Expected type '{0}' but received non-matching null value with associated type '{1}'.
-ODataUriUtils_ConvertFromUriLiteralNullOnNonNullableType=Type verification failed. Expected non-nullable type '{0}' but received a null value.
-
-ODataUtils_CannotConvertValueToRawString=The value of type '{0}' could not be converted to a raw string.
-ODataUtils_DidNotFindDefaultMediaType=A default MIME type could not be found for the requested payload in format '{0}'.
-ODataUtils_UnsupportedVersionHeader=The value '{0}' of the OData-Version HTTP header is invalid. Only '4.0' and '4.01' are supported as values for the OData-Version header.
-ODataUtils_MaxProtocolVersionExceeded=An OData version of {0} was specified and the maximum supported OData version is {1}.
-ODataUtils_UnsupportedVersionNumber=An invalid enum value was specified for the version number.
-ODataUtils_ModelDoesNotHaveContainer=The provided model does not contain an entity container.
-
-ReaderUtils_EnumerableModified=The value returned by the '{0}' property cannot be modified until the end of the owning resource is reported by the reader.
-
-ReaderValidationUtils_NullValueForNonNullableType=A null value was found with the expected type '{0}[Nullable=False]'. The expected type '{0}[Nullable=False]' does not allow null values.
-ReaderValidationUtils_NullValueForNullableType=A null value was found for a collection of type '{0}[Nullable=True]. Collection-valued properties with Nullable=True can contain null values, but collection-valued properties cannot themselves be null.
-ReaderValidationUtils_NullNamedValueForNonNullableType=A null value was found for the property named '{0}', which has the expected type '{1}[Nullable=False]'. The expected type '{1}[Nullable=False]' does not allow null values.
-ReaderValidationUtils_NullNamedValueForNullableType=A null value was found for the property named '{0}', which has the expected type '{1}[Nullable=True]'. The expected type '{1}[Nullable=True]' cannot be null but it can have null values.
-ReaderValidationUtils_EntityReferenceLinkMissingUri=No URI value was found for an entity reference link. A single URI value was expected.
-ReaderValidationUtils_ValueWithoutType=A value without a type name was found and no expected type is available. When the model is specified, each value in the payload must have a type which can be either specified in the payload, explicitly by the caller or implicitly inferred from the parent value.
-ReaderValidationUtils_ResourceWithoutType=A resource without a type name was found, but no expected type was specified. To allow entries without type information, the expected type must also be specified when the model is specified.
-ReaderValidationUtils_CannotConvertPrimitiveValue=Cannot convert the literal '{0}' to the expected type '{1}'.
-ReaderValidationUtils_MessageReaderSettingsBaseUriMustBeNullOrAbsolute=The base URI '{0}' specified in ODataMessageReaderSettings.BaseUri is invalid; it must be either null or an absolute URI.
-ReaderValidationUtils_UndeclaredPropertyBehaviorKindSpecifiedOnRequest=The ODataMessageReaderSettings.UndeclaredPropertyBehaviorKinds is not set to ODataUndeclaredPropertyBehaviorKinds.None. When reading request payloads, the ODataMessageReaderSettings.UndeclaredPropertyBehaviorKinds property must be set to ODataUndeclaredPropertyBehaviorKinds.None; other values are not supported.
-ReaderValidationUtils_ContextUriValidationInvalidExpectedEntitySet=The context URI '{0}' references the entity set with name '{1}'; however, the name of the expected entity set is '{2}' and does not match the entity set referenced in the context URI.
-ReaderValidationUtils_ContextUriValidationInvalidExpectedEntityType=The context URI '{0}' references the entity type with name '{1}'; however, the name of the expected entity type is '{2}' which is not compatible with the entity type with name '{1}'.
-ReaderValidationUtils_ContextUriValidationNonMatchingPropertyNames=The context URI '{0}' references the property with name '{1}' on type '{2}'; however, the name of the expected property is '{3}'.
-ReaderValidationUtils_ContextUriValidationNonMatchingDeclaringTypes=The context URI '{0}' references the property with name '{1}' on type '{2}'; however, the declaring type of the expected property is '{3}'.
-ReaderValidationUtils_NonMatchingPropertyNames=The property or operation import name '{0}' was read from the payload; however, the name of the expected property or operation import is '{1}'.
-ReaderValidationUtils_TypeInContextUriDoesNotMatchExpectedType=The context URI '{0}' references the type '{1}'; however the expected type is '{2}'.
-ReaderValidationUtils_ContextUriDoesNotReferTypeAssignableToExpectedType=The context URI '{0}' refers to the item type '{1}' which is not assignable to the expected item type '{2}'.
-ReaderValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint=The value type '{0}' is not allowed due to an Org.OData.Validation.V1.DerivedTypeConstraint annotation on {1} '{2}'.
-
-ODataMessageReader_ReaderAlreadyUsed=The ODataMessageReader has already been used to read a message payload. An ODataMessageReader can only be used once to read a payload for a given message.
-ODataMessageReader_ErrorPayloadInRequest=A top-level error cannot be read from request payloads. Top-level errors are only supported in responses.
-ODataMessageReader_ServiceDocumentInRequest=A service document cannot be read from request payloads. Service documents are only supported in responses.
-ODataMessageReader_MetadataDocumentInRequest=A metadata document cannot be read from request payloads. Metadata documents are only supported in responses.
-ODataMessageReader_DeltaInRequest=Delta are only supported in responses.
-ODataMessageReader_ExpectedTypeSpecifiedWithoutMetadata=The parameter '{0}' is specified with a non-null value, but no metadata is available for the reader. The expected type can only be specified if metadata is made available to the reader.
-ODataMessageReader_EntitySetSpecifiedWithoutMetadata=The parameter '{0}' is specified with a non-null value, but no metadata is available for the reader. The entity set can only be specified if metadata is made available to the reader.
-ODataMessageReader_OperationImportSpecifiedWithoutMetadata=The parameter '{0}' is specified with a non-null value, but no metadata is available for the reader. The operation import can only be specified if metadata is made available to the reader.
-ODataMessageReader_OperationSpecifiedWithoutMetadata=The parameter '{0}' is specified with a non-null value, but no metadata is available for the reader. The operation can only be specified if metadata is made available to the reader.
-ODataMessageReader_ExpectedCollectionTypeWrongKind=The expected type for a collection reader is of kind '{0}'. Only types of Primitive or ComplexType kind can be specified as the expected type for a collection reader.
-ODataMessageReader_ExpectedPropertyTypeEntityCollectionKind=The expected type for property reading is of entity collection kind. Top-level properties can only be of primitive, complex, primitive collection or complex collection kind.
-ODataMessageReader_ExpectedPropertyTypeEntityKind=The expected type for property reading is of entity kind. Top-level properties cannot be of entity type.
-ODataMessageReader_ExpectedPropertyTypeStream=The expected type for property reading is Edm.Stream. Top-level properties cannot be of stream type.
-ODataMessageReader_ExpectedValueTypeWrongKind=The expected type for a value is of kind '{0}'. Only types of Primitive kind can be specified as the expected type for reading a value.
-ODataMessageReader_NoneOrEmptyContentTypeHeader=A missing or empty content type header was found when trying to read a message. The content type header is required.
-ODataMessageReader_WildcardInContentType=The wildcard '*' was detected in the value '{0}' of the content type header. The value of the content type header cannot contain wildcards.
-ODataMessageReader_GetFormatCalledBeforeReadingStarted=GetFormat was called before reading was started. GetFormat can only be called after a read method was called or a reader was created.
-ODataMessageReader_DetectPayloadKindMultipleTimes=DetectPayloadKind or DetectPayloadKindAsync was called more than once; DetectPayloadKind or DetectPayloadKindAsync can only be called once.
-ODataMessageReader_PayloadKindDetectionRunning=Payload kind detection has not completed. Read or create methods cannot be called on the ODataMessageReader before payload kind detection is complete.
-ODataMessageReader_PayloadKindDetectionInServerMode=The ODataMessageReader is using the server behavior for WCF Data Services, as specified in its settings. Payload kind detection is not supported when using the WCF Data services server behavior.
-ODataMessageReader_ParameterPayloadInResponse=A parameter payload cannot be read from a response payload. Parameter payloads are only supported in requests.
-ODataMessageReader_SingletonNavigationPropertyForEntityReferenceLinks=The navigation property '{0}' with singleton cardinality on type '{1}' was specified for reading a collection of entity reference links. A navigation property with collection cardinality has to be provided.
-
-ODataAsyncResponseMessage_MustNotModifyMessage=An attempt was made to modify the message. The message cannot be modified.
-ODataMessage_MustNotModifyMessage=An attempt was made to modify the message. The message cannot be modified.
-
-
-ODataReaderCore_SyncCallOnAsyncReader=A synchronous operation was called on an asynchronous reader. Calls on a reader instance must be either all synchronous or all asynchronous.
-ODataReaderCore_AsyncCallOnSyncReader=An asynchronous operation was called on a synchronous reader. Calls on a reader instance must be either all synchronous or all asynchronous.
-ODataReaderCore_ReadOrReadAsyncCalledInInvalidState=ODataReader.ReadAsync or ODataReader.Read was called in an invalid state. No further calls can be made to the reader in state '{0}'.
-ODataReaderCore_CreateReadStreamCalledInInvalidState=CreateReadStream was called in an invalid state. CreateReadStream can only be called once in ReaderState.Stream.
-ODataReaderCore_CreateTextReaderCalledInInvalidState=CreateTextReader was called in an invalid state. CreateTextReader can only be called once in ReaderState.Stream.
-ODataReaderCore_ReadCalledWithOpenStream=Read called with an open stream or textreader. Please close any open streams or text readers before calling Read.
-ODataReaderCore_NoReadCallsAllowed=Calling Read or ReadAsync on an ODataReader instance is not allowed in state '{0}'.
-ODataWriterCore_PropertyValueAlreadyWritten=Attempted to write a value for a property {0} whose value has already been written.
-ODataJsonReader_CannotReadResourcesOfResourceSet=A node of type '{0}' was read from the JSON reader when trying to read the resources of a resource set. A 'StartObject' or 'EndArray' node was expected.
-
-ODataJsonReaderUtils_CannotConvertInt32=Cannot convert a value of type 'Edm.Int32' to the expected target type '{0}'.
-ODataJsonReaderUtils_CannotConvertDouble=Cannot convert a value of type 'Edm.Double' to the expected target type '{0}'.
-ODataJsonReaderUtils_CannotConvertBoolean=Cannot convert a value of type 'Edm.Boolean' to the expected target type '{0}'.
-ODataJsonReaderUtils_CannotConvertDecimal=Cannot convert a value of type 'Edm.Decimal' to the expected target type '{0}'.
-ODataJsonReaderUtils_CannotConvertDateTime=Cannot convert a value of type 'Edm.DateTime' to the expected target type '{0}'.
-ODataJsonReaderUtils_CannotConvertDateTimeOffset=Cannot convert a value of type 'Edm.DateTimeOffset' to the expected target type '{0}'.
-ODataJsonReaderUtils_ConflictBetweenInputFormatAndParameter=Cannot convert a value to target type '{0}' because of conflict between input format string/number and parameter 'IEEE754Compatible' false/true.
-ODataJsonReaderUtils_MultipleErrorPropertiesWithSameName=Multiple '{0}' properties were found in an error or inner error object. In OData, an error or inner error must have at most one '{0}' property.
-
-ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustSpecifyTarget=Multiple operations have the same 'Metadata' property value of '{0}'. The 'Target' property value of these operations must be set to a non-null value.
-ODataJsonResourceSerializer_ActionsAndFunctionsGroupMustNotHaveDuplicateTarget=Multiple operations have the same 'Metadata' property value of '{0}' and the same 'Target' property value of '{1}'. When multiple operations have the same 'Metadata' property value, their 'Target' property values must be unique.
-
-ODataJsonErrorDeserializer_TopLevelErrorWithInvalidProperty=A property with name '{0}' was found in the error object when reading a top-level error. In OData, a top-level error object must have exactly one property with name 'error'.
-ODataJsonErrorDeserializer_TopLevelErrorMessageValueWithInvalidProperty=A property with name '{0}' was found in the message value of a top-level error. In OData, the message value of a top-level error value can only have properties with name 'lang' or 'value'.
-
-
-ODataCollectionReaderCore_ReadOrReadAsyncCalledInInvalidState=ODataCollectionReader.ReadAsync or ODataCollectionReader.Read was called in an invalid state. No further calls can be made to the reader in state '{0}'.
-ODataCollectionReaderCore_SyncCallOnAsyncReader=A synchronous operation was called on an asynchronous collection reader. All calls on a collection reader instance must be either synchronous or asynchronous.
-ODataCollectionReaderCore_AsyncCallOnSyncReader=An asynchronous operation was called on a synchronous collection reader. All calls on a collection reader instance must be either synchronous or asynchronous.
-ODataCollectionReaderCore_ExpectedItemTypeSetInInvalidState=The current state of the collection reader is '{0}'; however, the expected item type of a collection reader can only be set in state '{1}'.
-
-ODataParameterReaderCore_ReadOrReadAsyncCalledInInvalidState=ODataParameterReader.ReadAsync or ODataParameterReader.Read was called in an invalid state. No further calls can be made to the reader in state '{0}'.
-ODataParameterReaderCore_SyncCallOnAsyncReader=A synchronous operation was called on an asynchronous parameter reader. All calls on a parameter reader instance must be either synchronous or asynchronous.
-ODataParameterReaderCore_AsyncCallOnSyncReader=An asynchronous operation was called on a synchronous parameter reader. All calls on a parameter reader instance must be either synchronous or asynchronous.
-ODataParameterReaderCore_SubReaderMustBeCreatedAndReadToCompletionBeforeTheNextReadOrReadAsyncCall=ODataParameterReader.ReadAsync or ODataParameterReader.Read was called in the '{0}' state. '{1}' must be called in this state, and the created reader must be in the 'Completed' state before the next ODataParameterReader.ReadAsync or ODataParameterReader.Read can be called.
-ODataParameterReaderCore_SubReaderMustBeInCompletedStateBeforeTheNextReadOrReadAsyncCall=ODataParameterReader.ReadAsync or ODataParameterReader.Read was called in the '{0}' state and '{1}' was called but the created reader is not in the 'Completed' state. The created reader must be in 'Completed' state before the next ODataParameterReader.ReadAsync or ODataParameterReader.Read can be called.
-ODataParameterReaderCore_InvalidCreateReaderMethodCalledForState=You cannot call the method '{0}' in state '{1}'.
-ODataParameterReaderCore_CreateReaderAlreadyCalled=The '{0}' method has already been called for the parameter '{1}'. Only one create reader method call is allowed for each resource, resource set, or collection parameter.
-ODataParameterReaderCore_ParameterNameNotInMetadata=The parameter '{0}' in the request payload is not a valid parameter for the operation '{1}'.
-ODataParameterReaderCore_DuplicateParametersInPayload=Multiple parameters with the name '{0}' were found in the request payload.
-ODataParameterReaderCore_ParametersMissingInPayload=One or more parameters of the operation '{0}' are missing from the request payload. The missing parameters are: {1}.
-
-
-
-
-ValidationUtils_ActionsAndFunctionsMustSpecifyMetadata=The 'Metadata' property on an {0} must be set to a non-null value.
-ValidationUtils_ActionsAndFunctionsMustSpecifyTarget=The 'Target' property on an {0} must be set to a non-null value.
-ValidationUtils_EnumerableContainsANullItem=The '{0}' enumerable contains a null item. This enumerable cannot contain null items.
-ValidationUtils_AssociationLinkMustSpecifyName=The 'Name' property on an ODataAssociationLink must be set to a non-empty string.
-ValidationUtils_AssociationLinkMustSpecifyUrl=The 'Url' property on an ODataAssociationLink must be set to a non-null value that represents the association or associations the link references.
-ValidationUtils_TypeNameMustNotBeEmpty=An empty type name was found; the name of a type cannot be an empty string.
-ValidationUtils_PropertyDoesNotExistOnType=The property '{0}' does not exist on type '{1}'. Make sure to only use property names that are defined by the type or mark the type as open type.
-ValidationUtils_ResourceMustSpecifyUrl=The 'Url' property on a resource collection must be set to a non-null value.
-ValidationUtils_ResourceMustSpecifyName=The 'Name' property on a resource collection with the 'Url' '{0}' must be set to a non-null value.
-ValidationUtils_ServiceDocumentElementUrlMustNotBeNull=A service document element without a Url was detected; a service document element must have a non-null Url value.
-ValidationUtils_NonPrimitiveTypeForPrimitiveValue=A primitive value was specified; however, a value of the non-primitive type '{0}' was expected.
-ValidationUtils_UnsupportedPrimitiveType=Unsupported primitive type. A primitive type could not be determined for an instance of type '{0}'.
-ValidationUtils_IncompatiblePrimitiveItemType=An incompatible primitive type '{0}[Nullable={1}]' was found for an item that was expected to be of type '{2}[Nullable={3}]'.
-ValidationUtils_NonNullableCollectionElementsMustNotBeNull=A null value was detected in the items of a collection property value; non-nullable instances of collection types do not support null values as items.
-ValidationUtils_InvalidCollectionTypeName=Type name '{0}' is an invalid collection type name; a collection type name must be in the format 'Collection()'.
-ValidationUtils_UnrecognizedTypeName=A type named '{0}' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.
-ValidationUtils_IncorrectTypeKind=Incompatible type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'.
-ValidationUtils_IncorrectTypeKindNoTypeName=Incompatible type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'.
-ValidationUtils_IncorrectValueTypeKind=A value with type '{0}' was found, which is of kind '{1}'. Value can only be of kind 'Primitive', 'Complex' or 'Collection'.
-ValidationUtils_LinkMustSpecifyName=The 'Name' property on an ODataNestedResourceInfo must be set to a non-empty string.
-ValidationUtils_MismatchPropertyKindForStreamProperty=The property '{0}' cannot be a stream property because it is not of kind EdmPrimitiveTypeKind.Stream.
-ValidationUtils_NestedCollectionsAreNotSupported=Nested collection instances are not allowed.
-ValidationUtils_StreamReferenceValuesNotSupportedInCollections=An ODataStreamReferenceValue item was found in a collection property value, which is not allowed. Collection properties can only have primitive and complex values as items.
-ValidationUtils_IncompatibleType=A value was encountered that has a type name that is incompatible with the metadata. The value specified its type as '{0}', but the type specified in the metadata is '{1}'.
-ValidationUtils_OpenCollectionProperty=An open collection property '{0}' was found. In OData, open collection properties are not supported.
-ValidationUtils_OpenStreamProperty=An open stream property '{0}' was found. In OData, open stream properties are not supported.
-ValidationUtils_InvalidCollectionTypeReference=An invalid collection type kind '{0}' was found. In OData, collection types must be of kind 'Collection'.
-ValidationUtils_ResourceWithMediaResourceAndNonMLEType=A resource with type '{0}' was found with a media resource, but this entity type is not a media link resource (MLE). When the type is not an MLE entity, the resource cannot have a media resource.
-ValidationUtils_ResourceWithoutMediaResourceAndMLEType=A resource with type '{0}' was found without a media resource, but this entity type is a media link resource (MLE). When the type is an MLE entity, the resource must have a media resource.
-ValidationUtils_ResourceTypeNotAssignableToExpectedType=A resource with type '{0}' was found, but it is not assignable to the expected type '{1}'. The type specified in the resource must be equal to either the expected type or a derived type.
-ValidationUtils_NavigationPropertyExpected=A property with name '{0}' on type '{1}' has kind '{2}', but it is expected to be of kind 'Navigation'.
-ValidationUtils_InvalidBatchBoundaryDelimiterLength=The boundary delimiter '{0}' is invalid. A boundary delimiter must be non-null, be non-empty, and have a maximum of {1} characters.
-ValidationUtils_RecursionDepthLimitReached=The maximum recursion depth limit was reached. The depth of nested values in a single property cannot exceed {0}.
-ValidationUtils_MaxDepthOfNestedEntriesExceeded=The depth limit for entries in nested expanded navigation links was reached. The number of nested expanded entries cannot exceed {0}.
-ValidationUtils_NullCollectionItemForNonNullableType=A null value was found in a collection, but the expected collection item type '{0}' does not allow null values.
-ValidationUtils_PropertiesMustNotContainReservedChars=The property name '{0}' is invalid; property names must not contain any of the reserved characters {1}.
-ValidationUtils_WorkspaceResourceMustNotContainNullItem=A null value was detected when enumerating the collections in a workspace. Workspace collections cannot be null.
-ValidationUtils_InvalidMetadataReferenceProperty=Encountered a property '{0}' that was expected to be a reference to a location in the $metadata document but does not contain a '#' character or is otherwise not a valid metadata reference property. A metadata reference property must contain a '#' and be a valid absolute URI or begin with a '#' and be a valid URI fragment.
-
-WriterValidationUtils_PropertyMustNotBeNull=The 'ODataResource.Properties' enumerable contains a null item. This enumerable cannot contain null items.
-WriterValidationUtils_PropertiesMustHaveNonEmptyName=An ODataProperty instance without a name was detected; an ODataProperty must have a non-null, non-empty name.
-WriterValidationUtils_MissingTypeNameWithMetadata=No TypeName was found for an ODataResource of an open property, ODataResource or custom instance annotation, even though metadata was specified. If a model is passed to the writer, each complex value on an open property, resource or custom instance annotation must have a type name.
-WriterValidationUtils_NextPageLinkInRequest=The ODataResourceSet.NextPageLink must be null for request payloads. A next link is only supported in responses.
-WriterValidationUtils_DefaultStreamWithContentTypeWithoutReadLink=A default stream ODataStreamReferenceValue was detected with a 'ContentType' property but without a ReadLink value. In OData, a default stream must either have both a content type and a read link, or neither of them.
-WriterValidationUtils_DefaultStreamWithReadLinkWithoutContentType=A default stream ODataStreamReferenceValue was detected with a 'ReadLink' property but without a ContentType value. In OData, a default stream must either have both a content type and a read link, or neither of them.
-WriterValidationUtils_StreamReferenceValueMustHaveEditLinkOrReadLink=An ODataStreamReferenceValue was detected with null values for both EditLink and ReadLink. In OData, a stream resource must have at least an edit link or a read link.
-WriterValidationUtils_StreamReferenceValueMustHaveEditLinkToHaveETag=An ODataStreamReferenceValue was detected with an ETag but without an edit link. In OData, a stream resource must have an edit link to have an ETag.
-WriterValidationUtils_StreamReferenceValueEmptyContentType=An ODataStreamReferenceValue was detected with an empty string 'ContentType' property. In OData, a stream resource must either have a non-empty content type or it must be null.
-WriterValidationUtils_EntriesMustHaveNonEmptyId=A resource with an empty ID value was detected. In OData, a resource must either a non-empty ID value or no ID value.
-WriterValidationUtils_MessageWriterSettingsBaseUriMustBeNullOrAbsolute=The base URI '{0}' specified in ODataMessageWriterSettings.BaseUri is invalid; it must either be null or an absolute URI.
-WriterValidationUtils_EntityReferenceLinkUrlMustNotBeNull=An ODataEntityReferenceLink with a null Url was detected; an ODataEntityReferenceLink must have a non-null Url.
-WriterValidationUtils_EntityReferenceLinksLinkMustNotBeNull=The 'ODataEntityReferenceLinks.Links' enumerable contains a null item. This enumerable cannot contain null items.
-WriterValidationUtils_NestedResourceTypeNotCompatibleWithParentPropertyType=The type '{0}' of a resource in an expanded link is not compatible with the element type '{1}' of the expanded link. Entries in an expanded link must have entity types that are assignable to the element type of the expanded link.
-WriterValidationUtils_ExpandedLinkIsCollectionTrueWithResourceContent=The ODataNestedResourceInfo with the URL value '{0}' specifies in its 'IsCollection' property that its payload is a resource set, but the actual payload is a resource.
-WriterValidationUtils_ExpandedLinkIsCollectionFalseWithResourceSetContent=The ODataNestedResourceInfo with the URL value '{0}' specifies in its 'IsCollection' property that its payload is a resource, but the actual payload is a resource set.
-WriterValidationUtils_ExpandedLinkIsCollectionTrueWithResourceMetadata=The ODataNestedResourceInfo with the URL value '{0}' specifies in its 'IsCollection' property that its payload is a resource set, but the metadata declares it as a resource.
-WriterValidationUtils_ExpandedLinkIsCollectionFalseWithResourceSetMetadata=The ODataNestedResourceInfo with the URL value '{0}' specifies in its 'IsCollection' property that its payload is a resource, but the metadata declares it as resource set.
-WriterValidationUtils_ExpandedLinkWithResourceSetPayloadAndResourceMetadata=The content of the ODataNestedResourceInfo with the URL value '{0}' is a resource set, but the metadata declares it as a resource.
-WriterValidationUtils_ExpandedLinkWithResourcePayloadAndResourceSetMetadata=The content of the ODataNestedResourceInfo with the URL value '{0}' is a resource, but the metadata declares it as resource set.
-WriterValidationUtils_CollectionPropertiesMustNotHaveNullValue=The collection property '{0}' has a null value, which is not allowed. In OData, collection properties cannot have null values.
-WriterValidationUtils_NonNullablePropertiesMustNotHaveNullValue=The property '{0}[Nullable=False]' of type '{1}' has a null value, which is not allowed.
-WriterValidationUtils_StreamPropertiesMustNotHaveNullValue=The stream property '{0}' has a null value, which is not allowed. In OData, stream properties cannot have null values.
-WriterValidationUtils_OperationInRequest=An action or a function with metadata '{0}' was detected when writing a request; actions and functions are only supported in responses.
-WriterValidationUtils_AssociationLinkInRequest=An association link with name '{0}' could not be written to the request payload. Association links are only supported in responses.
-WriterValidationUtils_StreamPropertyInRequest=The stream property {0} in a request payload cannot contain etag, editLink, or readLink values.
-WriterValidationUtils_MessageWriterSettingsServiceDocumentUriMustBeNullOrAbsolute=The service document URI '{0}' specified is invalid; it must be either null or an absolute URI.
-WriterValidationUtils_NavigationLinkMustSpecifyUrl=The ODataNestedResourceInfo.Url property on an navigation link '{0}' is null. The ODataNestedResourceInfo.Url property must be set to a non-null value that represents the entity or entities the navigation link references.
-WriterValidationUtils_NestedResourceInfoMustSpecifyIsCollection=The ODataNestedResourceInfo.IsCollection property on a nested resource info '{0}' is null. The ODataNestedResourceInfo.IsCollection property must be specified when writing a nested resource into a request.
-WriterValidationUtils_MessageWriterSettingsJsonPaddingOnRequestMessage=A JSON Padding function was specified on ODataMessageWriterSettings when trying to write a request message. JSON Padding is only for writing responses.
-WriterValidationUtils_ValueTypeNotAllowedInDerivedTypeConstraint=The value type '{0}' is not allowed due to an Org.OData.Validation.V1.DerivedTypeConstraint annotation on {1} '{2}'.
-
-XmlReaderExtension_InvalidNodeInStringValue=An XML node of type '{0}' was found in a string value. An element with a string value can only contain Text, CDATA, SignificantWhitespace, Whitespace or Comment nodes.
-XmlReaderExtension_InvalidRootNode=An XML node of type '{0}' was found at the root level. The root level of an OData payload must contain a single XML element and no text nodes.
-
-ODataMetadataInputContext_ErrorReadingMetadata=The metadata document could not be read from the message content.\r\n{0}
-
-ODataMetadataOutputContext_ErrorWritingMetadata=The metadata document could not be written as specified.\r\n{0}
-ODataMetadataOutputContext_NotSupportJsonMetadata=The JSON metadata is not supported at this platform. It's only supported at platform implementing .NETStardard 2.0.
-
-ODataXmlDeserializer_RelativeUriUsedWithoutBaseUriSpecified=A relative URI value '{0}' was specified in the payload, but no base URI for it was found. When the payload contains a relative URI, there must be an xml:base in the payload or else a base URI must specified in the reader settings.
-
-ODataPropertyAndValueDeserializer_InvalidCollectionElement=The element with name '{0}' is not a valid collection item. The name of the collection item element must be 'element' and it must belong to the '{1}' namespace.
-ODataPropertyAndValueDeserializer_NavigationPropertyInProperties=The property '{0}' on type '{1}' was found in the {{http://docs.oasis-open.org/odata/ns/metadata}}:properties element, and it is declared as a navigation property.
-
-JsonInstanceAnnotationWriter_NullValueNotAllowedForInstanceAnnotation=Writing null value for the instance annotation '{0}' is not allowed. The instance annotation '{0}' has the expected type '{1}[Nullable=False]'.
-
-EdmLibraryExtensions_OperationGroupReturningActionsAndFunctionsModelInvalid=When resolving operations '{0}' the group returned has both actions and functions with an invalid IEdmModel.
-EdmLibraryExtensions_UnBoundOperationsFoundFromIEdmModelFindMethodIsInvalid=Invalid implementation of an IEdmModel, an operation '{0}' was found using the IEdmModel method 'FindDeclaredBoundOperations' should never return non-bound operations.
-EdmLibraryExtensions_NoParameterBoundOperationsFoundFromIEdmModelFindMethodIsInvalid=Invalid implementation of an IEdmModel, an operation '{0}' was found using the IEdmModel method 'FindDeclaredBoundOperations' should never return bound operations without any parameters.
-EdmLibraryExtensions_ValueOverflowForUnderlyingType=Value '{0}' was either too large or too small for a '{1}'.
-
-ODataXmlResourceDeserializer_ContentWithWrongType=The 'type' attribute on element {{http://www.w3.org/2005/Atom}}:content is either missing or has an invalid value '{0}'. Only 'application/xml' and 'application/atom+xml' are supported as the value of the 'type' attribute on the {{http://www.w3.org/2005/Atom}}:content element.
-
-ODataXmlErrorDeserializer_MultipleErrorElementsWithSameName=Multiple '{{http://docs.oasis-open.org/odata/ns/metadata}}:{0}' elements were found in a top-level error value. In OData, the value of a top-level error value can have no more than one '{{http://docs.oasis-open.org/odata/ns/metadata}}:{0}' element
-ODataXmlErrorDeserializer_MultipleInnerErrorElementsWithSameName=Multiple '{{http://docs.oasis-open.org/odata/ns/metadata}}:{0}' elements were found in an inner error value. In OData, the value of an inner error value can have at most one '{{http://docs.oasis-open.org/odata/ns/metadata}}:{0}' element.
-
-CollectionWithoutExpectedTypeValidator_InvalidItemTypeKind=An invalid item type kind '{0}' was found. Items in a collection can only be of type kind 'Primitive' or 'Complex', but not of type kind '{0}'.
-CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeKind=An item of type kind '{0}' was found in a collection that otherwise has items of type kind '{1}'. In OData, all items in a collection must have the same type kind.
-CollectionWithoutExpectedTypeValidator_IncompatibleItemTypeName=An item with type name '{0}' was found in a collection of items with type name '{1}'. In OData, all items in a collection must have the same type name.
-
-ResourceSetWithoutExpectedTypeValidator_IncompatibleTypes=A resource of type '{0}' was found in a resource set that otherwise has entries of type '{1}'. In OData, all entries in a resource set must have a common base type.
-
-MessageStreamWrappingStream_ByteLimitExceeded=The maximum number of bytes allowed to be read from the stream has been exceeded. After the last read operation, a total of {0} bytes has been read from the stream; however a maximum of {1} bytes is allowed.
-
-MetadataUtils_ResolveTypeName=The custom type resolver set in ODataMessageWriterSettings.EnableWcfDataServicesClientBehavior returned 'null' when resolving the type '{0}'. When a custom type resolver is specified, it cannot return null.
-MetadataUtils_CalculateBindableOperationsForType=The method 'FindDeclaredBoundOperations' on the IEdmModel has thrown an exception when looking for operations with a binding type {0}. See inner exception for more details.
-
-EdmValueUtils_UnsupportedPrimitiveType=The type '{0}' was found for a primitive value. In OData, the type '{0}' is not a supported primitive type.
-EdmValueUtils_IncorrectPrimitiveTypeKind=Incompatible primitive type kinds were found. The type '{0}' was found to be of kind '{2}' instead of the expected kind '{1}'.
-EdmValueUtils_IncorrectPrimitiveTypeKindNoTypeName=Incompatible primitive type kinds were found. Found type kind '{0}' instead of the expected kind '{1}'.
-EdmValueUtils_CannotConvertTypeToClrValue=A value with primitive kind '{0}' cannot be converted into a primitive object value.
-
-ODataEdmStructuredValue_UndeclaredProperty=The property '{0}' is not declared on the non-open type '{1}'.
-
-
-ODataMetadataBuilder_MissingEntitySetUri=The entity set '{0}' doesn't have the 'OData.EntitySetUri' annotation. This annotation is required.
-ODataMetadataBuilder_MissingSegmentForEntitySetUriSuffix=The entity set '{0}' has a URI '{1}' which has no path segments. An entity set URI suffix cannot be appended to a URI without path segments.
-ODataMetadataBuilder_MissingEntityInstanceUri=Neither the 'OData.EntityInstanceUri' nor the 'OData.EntitySetUriSuffix' annotation was found for entity set '{0}'. One of these annotations is required.
-ODataMetadataBuilder_MissingParentIdOrContextUrl=Parent id or contained context url is missing which is required to compute id for contained instance. Specify ODataUri in the ODataMessageWriterSettings or return parent id or context url in the payload.
-ODataMetadataBuilder_UnknownEntitySet=The Id cannot be computed, since the navigation source '{0}' cannot be resolved to a known entity set from model.
-
-ODataJsonInputContext_EntityTypeMustBeCompatibleWithEntitySetBaseType=The entity type '{0}' is not compatible with the base type '{1}' of the provided entity set '{2}'. When an entity type is specified for an OData resource set or resource reader, it has to be the same or a subtype of the base type of the specified entity set.
-ODataJsonInputContext_PayloadKindDetectionForRequest=ODataMessageReader.DetectPayloadKind was called for a request payload. Payload kind detection is only supported for responses in Json.
-ODataJsonInputContext_OperationCannotBeNullForCreateParameterReader=The parameter '{0}' is specified with a null value. For Json, the '{0}' argument to the 'CreateParameterReader' method cannot be null.
-ODataJsonInputContext_NoEntitySetForRequest=Parsing Json resource sets or entries in requests without entity set is not supported. Pass in the entity set as a parameter to ODataMessageReader.CreateODataResourceReader or ODataMessageReader.CreateODataResourceSetReader method.
-ODataJsonInputContext_ModelRequiredForReading=Parsing Json payloads without a model is only supported for error payloads.
-ODataJsonInputContext_ItemTypeRequiredForCollectionReaderInRequests=An attempt to read a collection request payload without specifying a collection item type was detected. When reading collection payloads in requests, an expected item type has to be provided.
-
-ODataJsonDeserializer_ContextLinkNotFoundAsFirstProperty=The required instance annotation 'odata.context' was not found at the beginning of a response payload.
-ODataJsonDeserializer_OnlyODataTypeAnnotationCanTargetInstanceAnnotation=The annotation '{0}' was targeting the instance annotation '{1}'. Only the '{2}' annotation is allowed to target an instance annotation.
-ODataJsonDeserializer_AnnotationTargetingInstanceAnnotationWithoutValue=The annotation '{0}' is found targeting the instance annotation '{1}'. However the value for the instance annotation '{1}' is not found immediately after. In Json, an annotation targeting an instance annotation must be immediately followed by the value of the targeted instance annotation.
-
-ODataJsonWriter_EntityReferenceLinkAfterResourceSetInRequest=An attempt to write an entity reference link inside a navigation link after a resource set has been written inside the same navigation link in a request was detected. In Json requests, all entity reference links inside a navigation link have to be written before all resource sets inside the same navigation link.
-ODataJsonWriter_InstanceAnnotationNotSupportedOnExpandedResourceSet=The ODataResourceSet.InstanceAnnotations collection must be empty for expanded resource sets. Custom instance annotations are not supported on expanded resource sets.
-
-ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForResourceValueRequest=Neither an expected type nor a type name in the OData object model was provided for a resource value. When writing a request payload, either an expected type or a type name has to be specified.
-ODataJsonPropertyAndValueSerializer_NoExpectedTypeOrTypeNameSpecifiedForCollectionValueInRequest=Neither an expected type nor a type name in the OData object model was provided for a collection property. When writing a request payload, either an expected type or a type name has to be specified.
-
-ODataResourceTypeContext_MetadataOrSerializationInfoMissing=When writing a JSON response, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataResourceWriter method or the ODataResourceSerializationInfo must be set on the ODataResource or ODataResourceSet that is being written.
-ODataResourceTypeContext_ODataResourceTypeNameMissing=When writing a JSON response in full metadata mode, a user model must be specified and the entity set and entity type must be passed to the ODataMessageWriter.CreateODataResourceWriter method or the ODataResource.TypeName must be set.
-
-ODataContextUriBuilder_ValidateDerivedType=The base type '{0}' of the entity set specified for writing a payload is not assignable from the specified entity type '{1}'. When an entity type is specified it has to be the same or derived from the base type of the entity set.
-ODataContextUriBuilder_TypeNameMissingForTopLevelCollection=The collection type name for the top level collection is unknown. When writing a response, the item type must be passed to the ODataMessageWriter.CreateODataCollectionWriter method or the ODataCollectionStartSerializationInfo must be set on the ODataCollectionStart.
-ODataContextUriBuilder_UnsupportedPayloadKind=Context URL for payload kind '{0}' is not supported.
-ODataContextUriBuilder_StreamValueMustBePropertiesOfODataResource=The stream value must be a property of an ODataResource instance.
-ODataContextUriBuilder_NavigationSourceOrTypeNameMissingForResourceOrResourceSet=The navigationSource for resource or resource set is unknown or the Type is null. When writing a response, the navigation source or the type must be passed to the ODataMessageWriter.CreateODataResourceWriter/ODataMessageWriter.CreateODataResourceSetWriter method or the ODataResourceSerializationInfo must be set on the resource/resource set.
-ODataContextUriBuilder_ODataUriMissingForIndividualProperty=The ODataMessageWriterSetting.ODataUri must be set when writing individual property.
-ODataContextUriBuilder_TypeNameMissingForProperty=The type name for the top level property is unknown. When writing a response, the ODataValue must have a type name on itself or have a SerializationTypeNameAnnotation.
-ODataContextUriBuilder_ODataPathInvalidForContainedElement=The Path property '{0}' of ODataMessageWriterSetting.ODataUri must end with the navigation property which the contained elements being written belong to.
-
-ODataJsonPropertyAndValueDeserializer_UnexpectedAnnotationProperties=The annotation '{0}' was found. This annotation is either not recognized or not expected at the current position.
-ODataJsonPropertyAndValueDeserializer_UnexpectedPropertyAnnotation=The property '{0}' has a property annotation '{1}'. This annotation is either not recognized or not expected at the current position.
-ODataJsonPropertyAndValueDeserializer_UnexpectedODataPropertyAnnotation=An OData property annotation '{0}' was found. This property annotation is either not recognized or not expected at the current position.
-ODataJsonPropertyAndValueDeserializer_UnexpectedProperty=A property with name '{0}' was found. This property is either not recognized or not expected at the current position.
-ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyPayload=No top-level properties were found. A top-level property or collection in Json must be represented as a JSON object with exactly one property which is not an annotation.
-ODataJsonPropertyAndValueDeserializer_InvalidTopLevelPropertyName=A top-level property with name '{0}' was found in the payload; however, property and collection payloads must always have a top-level property with name '{1}'.
-ODataJsonPropertyAndValueDeserializer_InvalidTypeName=The 'odata.type' instance annotation value '{0}' is not a valid type name. The value of the 'odata.type' instance annotation must be a non-empty string.
-ODataJsonPropertyAndValueDeserializer_TopLevelPropertyAnnotationWithoutProperty=One or more property annotations for property '{0}' were found in the top-level property or collection payload without the property to annotate. Top-level property and collection payloads must contain a single property, with optional annotations for this property.
-ODataJsonPropertyAndValueDeserializer_ResourceValuePropertyAnnotationWithoutProperty=One or more property annotations for property '{0}' were found in the resource value without the property to annotate. Resource values must only contain property annotations for existing properties.
-ODataJsonPropertyAndValueDeserializer_ComplexValueWithPropertyTypeAnnotation=A complex property with an '{0}' property annotation was found. Complex properties must not have the '{0}' property annotation, instead the '{0}' should be specified as an instance annotation in the complex value.
-ODataJsonPropertyAndValueDeserializer_ResourceTypeAnnotationNotFirst=The 'odata.type' instance annotation in a resource object is not the first property of the object. In OData, the 'odata.type' instance annotation must be the first property of the resource object.
-ODataJsonPropertyAndValueDeserializer_UnexpectedDataPropertyAnnotation=The property '{0}' has a property annotation '{1}'. Primitive, complex, collection or open properties can only have an 'odata.type' property annotation.
-ODataJsonPropertyAndValueDeserializer_TypePropertyAfterValueProperty=The property with name '{0}' was found after the data property with name '{1}'. If a type is specified for a data property, it must appear before the data property.
-ODataJsonPropertyAndValueDeserializer_ODataTypeAnnotationInPrimitiveValue=An '{0}' annotation was read inside a JSON object representing a primitive value; type annotations for primitive values have to be property annotations of the owning property.
-ODataJsonPropertyAndValueDeserializer_TopLevelPropertyWithPrimitiveNullValue=A top-level property with an invalid primitive null value was found. In OData, top-level properties with null value have to be serialized as JSON object with an '{0}' annotation that has the value '{1}'.
-ODataJsonPropertyAndValueDeserializer_UnexpectedMetadataReferenceProperty=Encountered a metadata reference property '{0}' in a scope other than a resource. In OData, a property name with a '#' character indicates a reference into the metadata and is only supported for describing operations bound to a resource.
-ODataJsonPropertyAndValueDeserializer_NoPropertyAndAnnotationAllowedInNullPayload=The property with name '{0}' was found in a null payload. In OData, no properties or OData annotations can appear in a null payload.
-ODataJsonPropertyAndValueDeserializer_CollectionTypeNotExpected=A collection type of '{0}' was specified for a non-collection value.
-ODataJsonPropertyAndValueDeserializer_CollectionTypeExpected=A non-collection type of '{0}' was specified for a collection value.
-ODataJsonPropertyAndValueDeserializer_ODataResourceExpectedForProperty=The property with name '{0}' was found with a value node of type '{1}'; however, a resource value of type '{2}' was expected.
-
-ODataJsonReaderCoreUtils_CannotReadSpatialPropertyValue=The value specified for the spatial property was not valid. You must specify a valid spatial value.
-
-ODataJsonReader_UnexpectedPrimitiveValueForODataResource=If a primitive value is representing a resource, the resource must be null.
-ODataJsonReaderUtils_AnnotationWithNullValue=The '{0}' instance or property annotation has a null value. In OData, the '{0}' instance or property annotation must have a non-null string value.
-ODataJsonReaderUtils_InvalidValueForODataNullAnnotation=An '{0}' annotation was found with an invalid value. In OData, the only valid value for the '{0}' annotation is '{1}'.
-
-JsonInstanceAnnotationWriter_DuplicateAnnotationNameInCollection=The InstanceAnnotations collection has more than one instance annotations with the name '{0}'. All instance annotation names must be unique within the collection.
-
-ODataJsonContextUriParser_NullMetadataDocumentUri=A null metadata document URI was found in the payload. Metadata document URIs must not be null.
-ODataJsonContextUriParser_ContextUriDoesNotMatchExpectedPayloadKind=The context URI '{0}' is not valid for the expected payload kind '{1}'.
-ODataJsonContextUriParser_InvalidEntitySetNameOrTypeName=The context URI '{0}' references the entity set or type '{1}'. However, no entity set or type with name '{1}' is declared in the metadata.
-ODataJsonContextUriParser_InvalidPayloadKindWithSelectQueryOption=A '$select' query option was found for the payload kind '{0}'. In OData, a '$select' query option is only supported for payload kinds 'Resource' and 'ResourceSet'.
-ODataJsonContextUriParser_NoModel=No model was specified for the ODataMessageReader. A message reader requires a model for Json payload to be specified in the ODataMessageReader constructor.
-ODataJsonContextUriParser_InvalidContextUrl=The context URL '{0}' is invalid.
-ODataJsonContextUriParser_LastSegmentIsKeySegment=Last segment in context URL '{0}' should not be KeySegment.
-ODataJsonContextUriParser_TopLevelContextUrlShouldBeAbsolute=The top level context URL '{0}' should be an absolute Uri.
-
-ODataJsonResourceDeserializer_DeltaRemovedAnnotationMustBeObject=Invalid primitive value '{0}' for @removed annotation. @removed annotation must be a JSON object, optionally containing a 'reason' property.
-ODataJsonResourceDeserializer_ResourceTypeAnnotationNotFirst=The 'odata.type' instance annotation in a resource object is preceded by an invalid property. In OData, the 'odata.type' instance annotation must be either the first property in the JSON object or the second if the 'odata.context' instance annotation is present.
-ODataJsonResourceDeserializer_ResourceInstanceAnnotationPrecededByProperty=The '{0}' instance annotation in a resource object is preceded by a property or property annotation. In OData, the '{0}' instance annotation must be before any property or property annotation in a resource object.
-ODataJsonResourceDeserializer_UnexpectedDeletedEntryInResponsePayload=Encountered a deleted entity when reading a non-delta response payload. Deleted entities are only supported in request payloads and delta responses.
-ODataJsonResourceDeserializer_CannotReadResourceSetContentStart=A node of type '{0}' was read from the JSON reader when trying to read the start of the content of a resource set; however, a node of type 'StartArray' was expected.
-ODataJsonResourceDeserializer_ExpectedResourceSetPropertyNotFound=Did not find the required '{0}' property for the expected resource set.
-ODataJsonResourceDeserializer_InvalidNodeTypeForItemsInResourceSet=A node of type '{0}' was read from the JSON reader when trying to read the entries of a typed resource set; however, a node of type 'StartObject' or 'EndArray', or a null value, was expected.
-ODataJsonResourceDeserializer_InvalidPropertyAnnotationInTopLevelResourceSet=A property annotation for a property with name '{0}' was found when reading a top-level resource set. No property annotations, only instance annotations are allowed when reading top-level resource sets.
-ODataJsonResourceDeserializer_InvalidPropertyInTopLevelResourceSet=A property with name '{0}' was found when reading a top-level resource set. No properties other than the resource set property with name '{1}' are allowed.
-ODataJsonResourceDeserializer_PropertyWithoutValueWithWrongType=A property '{0}' which only has property annotations in the payload but no property value is declared to be of type '{1}'. In OData, only navigation properties and named streams can be represented as properties without values.
-ODataJsonResourceDeserializer_StreamPropertyInRequest=A stream property {0} was found in a Json request payload. Stream properties are only supported in responses.
-ODataJsonResourceDeserializer_UnexpectedStreamPropertyAnnotation=The stream property '{0}' has a property annotation '{1}'. Stream property can only have the 'odata.mediaEditLink', 'odata.mediaReadLink', 'odata.mediaEtag' and 'odata.mediaContentType' property annotations.
-ODataJsonResourceDeserializer_StreamPropertyWithValue=A stream property '{0}' has a value in the payload. In OData, stream property must not have a value, it must only use property annotations.
-ODataJsonResourceDeserializer_UnexpectedDeferredLinkPropertyAnnotation=The navigation property '{0}' has a property annotation '{1}'. Deferred navigation links can only have the 'odata.navigationLink' and 'odata.associationLink' property annotations.
-ODataJsonResourceDeserializer_CannotReadSingletonNestedResource=A node of type '{0}' was read from the JSON reader when trying to read the contents of the property '{1}'; however, a 'StartObject' node or 'PrimitiveValue' node with null value was expected.
-ODataJsonResourceDeserializer_CannotReadCollectionNestedResource=A node of type '{0}' was read from the JSON reader when trying to read the contents of the property '{1}'; however, a 'StartArray' node was expected.
-ODataJsonResourceDeserializer_CannotReadNestedResource=A 'PrimitiveValue' node with non-null value was found when trying to read the value of the property '{0}'; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected.
-ODataJsonResourceDeserializer_UnexpectedExpandedSingletonNavigationLinkPropertyAnnotation=The navigation property '{0}' has a property annotation '{1}'. Expanded resource navigation links can only have the 'odata.context', 'odata.navigationLink' and 'odata.associationLink' property annotations.
-ODataJsonResourceDeserializer_UnexpectedExpandedCollectionNavigationLinkPropertyAnnotation=The navigation property '{0}' has a property annotation '{1}'. Expanded resource set navigation links can only have the 'odata.context', 'odata.navigationLink', 'odata.associationLink' and 'odata.nextLink' property annotations
-ODataJsonResourceDeserializer_UnexpectedComplexCollectionPropertyAnnotation=The property '{0}' has a property annotation '{1}'. The complex collection property can only have the 'odata.count', 'odata.type' and 'odata.nextLink' property annotations.
-ODataJsonResourceDeserializer_DuplicateNestedResourceSetAnnotation=Multiple property annotations '{0}' were found when reading the nested resource '{1}'. Only a single property annotation '{0}' can be specified for a nested resource.
-ODataJsonResourceDeserializer_UnexpectedPropertyAnnotationAfterExpandedResourceSet=A property annotation '{0}' was found after the property '{1}' it is annotating. Only the 'odata.nextLink' property annotation can be used after the property it is annotating.
-ODataJsonResourceDeserializer_UnexpectedNavigationLinkInRequestPropertyAnnotation=The navigation property '{0}' has a property annotation '{1}'. Navigation links in request payloads can only have the '{2}' property annotation.
-ODataJsonResourceDeserializer_ArrayValueForSingletonBindPropertyAnnotation=The resource reference navigation property '{0}' has a property annotation '{1}' with an array value. Resource reference navigation properties can only have a property annotation '{1}' with a string value.
-ODataJsonResourceDeserializer_StringValueForCollectionBindPropertyAnnotation=The resource set reference navigation property '{0}' has a property annotation '{1}' with a string value. Resource set reference navigation properties can only have a property annotation '{1}' with an array value.
-ODataJsonResourceDeserializer_EmptyBindArray=The value of '{0}' property annotation is an empty array. The '{0}' property annotation must have a non-empty array as its value.
-ODataJsonResourceDeserializer_NavigationPropertyWithoutValueAndEntityReferenceLink=The navigation property '{0}' has no expanded value and no '{1}' property annotation. Navigation property in request without expanded value must have the '{1}' property annotation.
-ODataJsonResourceDeserializer_SingletonNavigationPropertyWithBindingAndValue=The resource reference navigation property '{0}' has both the '{1}' property annotation as well as a value. Resource reference navigation properties can have either '{1}' property annotations or values, but not both.
-ODataJsonResourceDeserializer_PropertyWithoutValueWithUnknownType=An undeclared property '{0}' which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.
-ODataJsonResourceDeserializer_OperationIsNotActionOrFunction=Encountered the operation '{0}' which can not be resolved to an ODataAction or ODataFunction.
-ODataJsonResourceDeserializer_MultipleOptionalPropertiesInOperation=Multiple '{0}' properties were found for an operation '{1}'. In OData, an operation can have at most one '{0}' property.
-ODataJsonResourceDeserializer_OperationMissingTargetProperty=Multiple target bindings encountered for the operation '{0}' but the 'target' property was not found in an operation value. To differentiate between multiple target bindings, each operation value must have exactly one 'target' property.
-ODataJsonResourceDeserializer_MetadataReferencePropertyInRequest=A metadata reference property was found in a Json request payload. Metadata reference properties are only supported in responses.
-
-ODataJsonValidationUtils_OperationPropertyCannotBeNull=The '{0}' property of the operation '{1}' cannot have a null value.
-ODataJsonValidationUtils_OpenMetadataReferencePropertyNotSupported=Encountered a reference into metadata '{0}' which does not refer to the known metadata url '{1}'. Open metadata reference properties are not supported.
-
-ODataJsonDeserializer_RelativeUriUsedWithouODataMetadataAnnotation=A relative URI value '{0}' was specified in the payload, but the {1} annotation is missing from the payload. The payload must only contain absolute URIs or the {1} annotation must be on the payload.
-
-ODataJsonResourceMetadataContext_MetadataAnnotationMustBeInPayload=The {0} annotation is missing from the payload.
-
-ODataJsonCollectionDeserializer_ExpectedCollectionPropertyNotFound=When trying to read the start of a collection, the expected collection property with name '{0}' was not found.
-ODataJsonCollectionDeserializer_CannotReadCollectionContentStart=A node of type '{0}' was read from the JSON reader when trying to read the items of a collection; however, a 'StartArray' node was expected.
-ODataJsonCollectionDeserializer_CannotReadCollectionEnd=A property or annotation for a property with name '{0}' or an instance annotation with name '{0}' was found after reading the items of a top-level collection. No additional properties or annotations are allowed after the collection property.
-ODataJsonCollectionDeserializer_InvalidCollectionTypeName=An 'odata.type' annotation with value '{0}' was found for a top-level collection payload; however, top-level collections must specify a collection type.
-
-ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkMustBeObjectValue=A node of type '{0}' was read from the JSON reader when trying to read the start of an entity reference link. In Json, entity reference links must be objects.
-ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLink=A property annotation with name '{0}' was detected when reading an entity reference link; entity reference links do not support property annotations.
-ODataJsonEntityReferenceLinkDeserializer_InvalidAnnotationInEntityReferenceLink=An instance annotation with name '{0}' or a property annotation for the property with name '{0}' was found when reading an entity reference link. No OData property or instance annotations are allowed when reading entity reference links.
-ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyInEntityReferenceLink=A property with name '{0}' was found when reading an entity reference link. No properties other than the entity reference link property with name '{1}' are allowed.
-ODataJsonEntityReferenceLinkDeserializer_MissingEntityReferenceLinkProperty=The required property '{0}' for an entity reference link was not found.
-ODataJsonEntityReferenceLinkDeserializer_MultipleUriPropertiesInEntityReferenceLink=Multiple '{0}' properties were found in an entity reference link object; however, a single '{0}' property was expected.
-ODataJsonEntityReferenceLinkDeserializer_EntityReferenceLinkUrlCannotBeNull=The '{0}' property of an entity reference link object cannot have a null value.
-ODataJsonEntityReferenceLinkDeserializer_PropertyAnnotationForEntityReferenceLinks=A property annotation was found for entity reference links; however, entity reference links only support instance annotations.
-ODataJsonEntityReferenceLinkDeserializer_InvalidEntityReferenceLinksPropertyFound=A property with name '{0}' or a property annotation for a property with name '{0}' was found when trying to read a collection of entity reference links; however, a property with name '{1}' was expected.
-ODataJsonEntityReferenceLinkDeserializer_InvalidPropertyAnnotationInEntityReferenceLinks=A property annotation for a property with name '{0}' was found when reading an entity reference links payload. No property annotations, only instance annotations are allowed when reading entity reference links.
-ODataJsonEntityReferenceLinkDeserializer_ExpectedEntityReferenceLinksPropertyNotFound=Did not find the required '{0}' property for an entity reference links payload.
-
-ODataJsonOperationsDeserializerUtils_OperationPropertyCannotBeNull=The '{0}' property of an operation '{1}' in '{2}' cannot have a null value.
-ODataJsonOperationsDeserializerUtils_OperationsPropertyMustHaveObjectValue=Found a node of type '{1}' when starting to read the '{0}' operations value, however a node of type 'StartObject' was expected. The '{0}' operations value must have an object value.
-
-ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocument=Multiple '{0}' properties were found in a service document. In OData, a service document must have exactly one '{0}' property.
-ODataJsonServiceDocumentDeserializer_DuplicatePropertiesInServiceDocumentElement=Multiple '{0}' properties were found in a service document element. In OData, a service document element must have exactly one '{0}' property.
-ODataJsonServiceDocumentDeserializer_MissingValuePropertyInServiceDocument=No '{0}' property was found for a service document. In OData, a service document must have exactly one '{0}' property.
-ODataJsonServiceDocumentDeserializer_MissingRequiredPropertyInServiceDocumentElement=Encountered a service document element without a '{0}' property. In service documents, service document elements must contain a '{0}' property.
-ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocument=An unrecognized property annotation '{0}' was found in a '{1}' object in a service document. OData property annotations are not allowed in workspaces.
-ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocument=An unrecognized instance annotation '{0}' was found in a '{1}' object in a service document. OData instance annotations are not allowed in workspaces.
-ODataJsonServiceDocumentDeserializer_PropertyAnnotationInServiceDocumentElement=An unrecognized property annotation '{0}' was found in a service document element. OData property annotations are not allowed in service document elements.
-ODataJsonServiceDocumentDeserializer_InstanceAnnotationInServiceDocumentElement=An unrecognized instance annotation '{0}' was found in a service document element. OData instance annotations are not allowed in service document elements.
-ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocumentElement=Encountered unexpected property '{0}' in a service document element. In service documents, service document element may only have '{1}' and '{2}' properties.
-ODataJsonServiceDocumentDeserializer_UnexpectedPropertyInServiceDocument=Encountered unexpected property '{0}' in a service document. The top level object of a service document may only have a '{1}' property.
-ODataJsonServiceDocumentDeserializer_PropertyAnnotationWithoutProperty=Encountered a property annotation for the property '{0}' which wasn't immediately followed by the property. Property annotations must occur directly before the property being annotated.
-
-ODataJsonParameterDeserializer_PropertyAnnotationForParameters=An OData property annotation was found for a parameter payload; however, parameter payloads do not support OData property annotations.
-ODataJsonParameterDeserializer_PropertyAnnotationWithoutPropertyForParameters=One or more property annotations for property '{0}' were found in a parameter payload without the property to annotate. Parameter payloads must not contain property annotations for properties that are not in the payload.
-ODataJsonParameterDeserializer_UnsupportedPrimitiveParameterType=The parameter '{0}' is of the '{1}' primitive type, which is not supported in Json.
-ODataJsonParameterDeserializer_NullCollectionExpected=When trying to read a null collection parameter value in Json, a node of type '{0}' with the value '{1}' was read from the JSON reader; however, a primitive 'null' value was expected.
-ODataJsonParameterDeserializer_UnsupportedParameterTypeKind=The parameter '{0}' is of an unsupported type kind '{1}'. Only primitive, enum, complex, primitive collection, enum collection and complex collection types are supported.
-
-SelectedPropertiesNode_StarSegmentNotLastSegment=When parsing a select clause a '*' segment was found before last segment of a property path. In OData, a '*' segment can only appear as last segment of a property path.
-SelectedPropertiesNode_StarSegmentAfterTypeSegment=When parsing a select clause a '*' segment was found immediately after a type segment in a property path. In OData, a '*' segment cannot appear following a type segment.
-
-ODataJsonErrorDeserializer_PropertyAnnotationNotAllowedInErrorPayload=An OData property annotation '{0}' was found in an error payload; however, error payloads do not support OData property annotations.
-ODataJsonErrorDeserializer_InstanceAnnotationNotAllowedInErrorPayload=An OData instance annotation '{0}' was found in an error payload; however, error payloads do not support OData instance annotations.
-ODataJsonErrorDeserializer_PropertyAnnotationWithoutPropertyForError=One or more property annotations for property '{0}' were found in an error payload without the property to annotate. Error payloads must not contain property annotations for properties that are not in the payload.
-ODataJsonErrorDeserializer_TopLevelErrorValueWithInvalidProperty=A property with name '{0}' was found in the error value of a top-level error. In OData, a top-level error value can only have properties with name 'code', 'message', or 'innererror', or custom instance annotations.
-
-ODataConventionalUriBuilder_EntityTypeWithNoKeyProperties=The entity type '{0}' has no key properties. Entity types must define at least one key property.
-ODataConventionalUriBuilder_NullKeyValue=The key property '{0}' on type '{1}' has a null value. Key properties must not have null values.
-
-ODataResourceMetadataContext_EntityTypeWithNoKeyProperties=An ODataResource of type '{0}' is found without key properties. When writing without a user model, each resource must contain at least one property whose 'ODataProperty.SerializationInfo.PropertyKind' set to 'ODataPropertyKind.Key'. When writing with a user model, the entity type '{0}' defined in the model must define at least one key property.
-ODataResourceMetadataContext_NullKeyValue=The key property '{0}' on type '{1}' has a null value. Key properties must not have null values.
-ODataResourceMetadataContext_KeyOrETagValuesMustBePrimitiveValues=The property '{0}' on type '{1}' is a non-primitive value. All key and etag properties must be of primitive types.
-ODataResource_PropertyValueCannotBeODataResourceValue=The value of a property '{0}' in ODataResource cannot be of type ODataResourceValue or collection of ODataResourceValue.
-
-EdmValueUtils_NonPrimitiveValue=The primitive property '{0}' on type '{1}' has a value which is not a primitive value.
-EdmValueUtils_PropertyDoesntExist=The entity instance value of type '{0}' doesn't have a value for property '{1}'. To compute an entity's metadata, its key and concurrency-token property values must be provided.
-
-ODataPrimitiveValue_CannotCreateODataPrimitiveValueFromNull=Cannot create an ODataPrimitiveValue from null; use ODataNullValue instead.
-ODataPrimitiveValue_CannotCreateODataPrimitiveValueFromUnsupportedValueType=An ODataPrimitiveValue was instantiated with a value of type '{0}'. ODataPrimitiveValue can only wrap values which can be represented as primitive EDM types.
-
-ODataInstanceAnnotation_NeedPeriodInName='{0}' is an invalid instance annotation name. An instance annotation name must contain a period that is not at the start or end of the name.
-ODataInstanceAnnotation_ReservedNamesNotAllowed='{0}' is a reserved instance annotation name because it starts with '{1}'. Reserved names are not allowed for custom instance annotations.
-ODataInstanceAnnotation_BadTermName='{0}' is an invalid instance annotation name.
-ODataInstanceAnnotation_ValueCannotBeODataStreamReferenceValue=The value of an instance annotation cannot be of type ODataStreamReferenceValue.
-
-ODataJsonValueSerializer_MissingTypeNameOnCollection=A type name was not provided for an instance of ODataCollectionValue.
-ODataJsonValueSerializer_MissingRawValueOnUntyped=A raw value was not provided for an instance of ODataUntypedValue.
-
-InstanceAnnotation_MissingTermAttributeOnAnnotationElement=Encountered an 'annotation' element without a 'term' attribute. All 'annotation' elements must have a 'term' attribute.
-InstanceAnnotation_AttributeValueNotationUsedWithIncompatibleType=The value of the 'type' attribute on an 'annotation' element was '{0}', which is incompatible with the '{1}' attribute.
-InstanceAnnotation_AttributeValueNotationUsedOnNonEmptyElement=Encountered the attribute '{0}' on a non-empty 'annotation' element. If attribute value notation is used to specify the annotation's value, then there can be no body to the element.
-InstanceAnnotation_MultipleAttributeValueNotationAttributes=Encountered an 'annotation' element with more than one attribute from following set: 'int', 'string', 'decimal', 'float', and 'bool'. Only one such attribute may appear on an 'annotation' element.
-
-AnnotationFilterPattern_InvalidPatternMissingDot=The pattern '{0}' is not a valid pattern to match an annotation. It must contain at least one '.' separating the namespace and the name segments of an annotation.
-AnnotationFilterPattern_InvalidPatternEmptySegment=The pattern '{0}' is not a valid pattern to match an annotation. It must not contain a namespace or name segment that is empty.
-AnnotationFilterPattern_InvalidPatternWildCardInSegment=The pattern '{0}' is not a supported pattern to match an annotation. It must not contain '*' as part of a segment.
-AnnotationFilterPattern_InvalidPatternWildCardMustBeInLastSegment=The pattern '{0}' is not a supported pattern to match an annotation. '*' must be the last segment of the pattern.
-
-
-; URI PARSER
-SyntacticTree_UriMustBeAbsolute=The specified URI '{0}' must be absolute.
-SyntacticTree_MaxDepthInvalid=The maximum depth setting must be a number greater than zero.
-SyntacticTree_InvalidSkipQueryOptionValue=Invalid value '{0}' for $skip query option found. The $skip query option requires a non-negative integer value.
-SyntacticTree_InvalidTopQueryOptionValue=Invalid value '{0}' for $top query option found. The $top query option requires a non-negative integer value.
-SyntacticTree_InvalidCountQueryOptionValue=Invalid value '{0}' for $count query option found. Valid values are '{1}'.
-SyntacticTree_InvalidIndexQueryOptionValue=Invalid value '{0}' for $index query option found. The $index query option requires an integer value.
-
-QueryOptionUtils_QueryParameterMustBeSpecifiedOnce=Query option '{0}' was specified more than once, but it must be specified at most once.
-
-UriBuilder_NotSupportedClrLiteral=The CLR literal of type '{0}' is not supported to be written as a Uri part.
-UriBuilder_NotSupportedQueryToken=QueryToken '{0}' is not supported to be written as a Uri part.
-
-UriQueryExpressionParser_TooDeep=Recursion depth exceeded allowed limit.
-UriQueryExpressionParser_ExpressionExpected=Expression expected at position {0} in '{1}'.
-UriQueryExpressionParser_OpenParenExpected='(' expected at position {0} in '{1}'.
-UriQueryExpressionParser_CloseParenOrCommaExpected=')' or ',' expected at position {0} in '{1}'.
-UriQueryExpressionParser_CloseParenOrOperatorExpected=')' or operator expected at position {0} in '{1}'.
-UriQueryExpressionParser_IllegalQueryOptioninDollarCount=Only $filter and $search query options are allowed within $count.
-UriQueryExpressionParser_CannotCreateStarTokenFromNonStar=Expecting a Star token but got: '{0}'.
-UriQueryExpressionParser_RangeVariableAlreadyDeclared=The range variable '{0}' has already been declared.
-UriQueryExpressionParser_AsExpected='as' expected at position {0} in '{1}'.
-UriQueryExpressionParser_WithExpected='with' expected at position {0} in '{1}'.
-UriQueryExpressionParser_UnrecognizedWithMethod=Unrecognized with '{0}' at '{1}' in '{2}'.
-UriQueryExpressionParser_PropertyPathExpected=Expression expected at position {0} in '{1}'.
-UriQueryExpressionParser_KeywordOrIdentifierExpected='{0}' expected at position {1} in '{2}'.
-UriQueryExpressionParser_InnerMostExpandRequireFilter=The inner most expand transformation requires a filter transformation at position {0} in '{1}'.
-
-UriQueryPathParser_RequestUriDoesNotHaveTheCorrectBaseUri=The URI '{0}' is not valid because it is not based on '{1}'.
-UriQueryPathParser_SyntaxError=Bad Request: there was an error in the query syntax.
-UriQueryPathParser_TooManySegments=Too many segments in URI.
-UriQueryPathParser_InvalidEscapeUri=The URI part '{0}' is not valid because there's no leading escape character.
-
-UriUtils_DateTimeOffsetInvalidFormat=The DateTimeOffset text '{0}' should be in format 'yyyy-mm-ddThh:mm:ss('.'s+)?(zzzzzz)?' and each field value is within valid range.
-
-SelectionItemBinder_NonNavigationPathToken=Inner or start path segments must be navigation properties in $select.
-
-MetadataBinder_ParameterAliasValueExpressionNotSingleValue=The parameter alias value expression is not string value.
-MetadataBinder_UnsupportedQueryTokenKind=An unsupported query token kind '{0}' was found.
-MetadataBinder_PropertyNotDeclared=Could not find a property named '{1}' on type '{0}'.
-MetadataBinder_InvalidIdentifierInQueryOption=Can not resolve the segment identifier '{0}' in query option.
-MetadataBinder_PropertyNotDeclaredOrNotKeyInKeyValue=Property '{0}' is not declared on type '{1}' or is not a key property. Only key properties can be used in key lookups.
-MetadataBinder_QualifiedFunctionNameWithParametersNotDeclared=Could not find a function named '{0}' with parameters '{1}'.
-MetadataBinder_UnnamedKeyValueOnTypeWithMultipleKeyProperties=An unnamed key value was used in a key lookup on a type '{0}' which has more than one key property. Unnamed key value can only be used on a type with one key property.
-MetadataBinder_DuplicitKeyPropertyInKeyValues=A key property '{0}' was found twice in a key lookup. Each key property can be specified just once in a key lookup.
-MetadataBinder_NotAllKeyPropertiesSpecifiedInKeyValues=A key lookup on type '{0}' didn't specify values for all key properties. All key properties must be specified in a key lookup.
-MetadataBinder_CannotConvertToType=Expression of type '{0}' cannot be converted to type '{1}'.
-MetadataBinder_FilterExpressionNotSingleValue=The $filter expression must evaluate to a single boolean value.
-MetadataBinder_OrderByExpressionNotSingleValue=The $orderby expression must evaluate to a single value of primitive type.
-MetadataBinder_PropertyAccessWithoutParentParameter=A PropertyAccessQueryToken without a parent was encountered outside of $filter or $orderby expression. The PropertyAccessQueryToken without a parent token is only allowed inside $filter or $orderby expressions.
-MetadataBinder_BinaryOperatorOperandNotSingleValue=The operand for a binary operator '{0}' is not a single value. Binary operators require both operands to be single values.
-MetadataBinder_UnaryOperatorOperandNotSingleValue=The operand for a unary operator '{0}' is not a single value. Unary operators require the operand to be a single value.
-MetadataBinder_LeftOperandNotSingleValue=The left operand for the IN operation is not a single value. IN operations require the left operand to be a single value and the right operand to be a collection value.
-MetadataBinder_RightOperandNotCollectionValue=The right operand for the IN operation is not a collection value. IN operations require the left operand to be a single value and the right operand to be a collection value.
-MetadataBinder_PropertyAccessSourceNotSingleValue=The parent value for a property access of a property '{0}' is not a single value. Property access can only be applied to a single value.
-MetadataBinder_CountSegmentNextTokenNotCollectionValue=The next token in a CountSegmentNode must be a collection.
-MetadataBinder_IncompatibleOperandsError=A binary operator with incompatible types was detected. Found operand types '{0}' and '{1}' for operator kind '{2}'.
-MetadataBinder_IncompatibleOperandError=A unary operator with an incompatible type was detected. Found operand type '{0}' for operator kind '{1}'.
-MetadataBinder_UnknownFunction=An unknown function with name '{0}' was found. This may also be a function import or a key lookup on a navigation property, which is not allowed.
-MetadataBinder_FunctionArgumentNotSingleValue=The argument for an invocation of a function with name '{0}' is not a single value. All arguments for this function must be single values.
-MetadataBinder_NoApplicableFunctionFound=No function signature for the function with name '{0}' matches the specified arguments. The function signatures considered are: {1}.
-MetadataBinder_BoundNodeCannotBeNull=A token of kind '{0}' was bound to the value null; this is invalid. A query token must always be bound to a non-null query node.
-MetadataBinder_TopRequiresNonNegativeInteger=The value '{0}' is not a non-negative integer value. In OData, the $top query option must specify a non-negative integer value.
-MetadataBinder_SkipRequiresNonNegativeInteger=The value '{0}' is not a non-negative integer value. In OData, the $skip query option must specify a non-negative integer value.
-MetadataBinder_QueryOptionsBindStateCannotBeNull=The bind state cannot be null. In OData, the bind state for query options should not be null and there should be query options in the object.
-MetadataBinder_QueryOptionsBindMethodCannotBeNull=The bind method cannot be null. In OData, the processing of query options should have a corresponding bind method.
-MetadataBinder_HierarchyNotFollowed=Encountered invalid type cast. '{0}' is not assignable from '{1}'.
-MetadataBinder_LambdaParentMustBeCollection=Any/All may only be used following a collection.
-MetadataBinder_ParameterNotInScope=The parameter '{0}' is not in scope.
-MetadataBinder_NavigationPropertyNotFollowingSingleEntityType=A navigation property can only follow single entity nodes.
-MetadataBinder_AnyAllExpressionNotSingleValue=The Any/All query expression must evaluate to a single boolean value.
-MetadataBinder_CastOrIsOfExpressionWithWrongNumberOfOperands=The Cast or IsOf expression has an invalid number of operands: number of operands is '{0}' and it should be 1 or 2.
-MetadataBinder_CastOrIsOfFunctionWithoutATypeArgument=Cast or IsOf Function must have a type in its arguments.
-MetadataBinder_CastOrIsOfCollectionsNotSupported=The Cast and IsOf functions do not support collection arguments or types.
-MetadataBinder_CollectionOpenPropertiesNotSupportedInThisRelease=Collection open properties are not supported in this release.
-MetadataBinder_IllegalSegmentType=Can only bind segments that are Navigation, Structural, Complex, or Collections. We found a segment '{0}' that isn't any of those. Please revise the query.
-MetadataBinder_QueryOptionNotApplicable=The '{0}' option cannot be applied to the query path. '{0}' can only be applied to a collection of entities.
-StringItemShouldBeQuoted=String item should be single/double quoted: '{0}'.
-StreamItemInvalidPrimitiveKind=Invalid PrimitiveTypeKind {0}. A Stream item must be of type binary or string, or none if unknown."
-ApplyBinder_AggregateExpressionIncompatibleTypeForMethod=$apply/aggregate expression '{0}' operation does not support value type '{1}'.
-ApplyBinder_UnsupportedAggregateMethod=$apply/aggregate does not support method '{0}'.
-ApplyBinder_UnsupportedAggregateKind=$apply/aggregate expression token kind '{0}' not supported.
-ApplyBinder_AggregateExpressionNotSingleValue=$apply/aggregate expression '{0}' must evaluate to a single value.
-ApplyBinder_GroupByPropertyNotPropertyAccessValue=$apply/groupby grouping expression '{0}' must evaluate to a property access value.
-ApplyBinder_UnsupportedType=$apply clause does not support type '{0}'.
-ApplyBinder_UnsupportedGroupByChild=$apply/groupby not support '{0}' as child transformation
-
-AggregateTransformationNode_UnsupportedAggregateExpressions=There are unsupported aggregation expressions in the transformation node.
-
-FunctionCallBinder_CannotFindASuitableOverload=Cannot find a suitable overload for function '{0}' that takes '{1}' arguments.
-FunctionCallBinder_UriFunctionMustHaveHaveNullParent=Found a Uri function '{0}' with a parent token. Uri functions cannot have parent tokens.
-FunctionCallBinder_CallingFunctionOnOpenProperty=Found a function '{0}' on an open property. Functions on open properties are not supported.
-FunctionCallParser_DuplicateParameterOrEntityKeyName=Parameter or entity key names must be unique. There is most likely an error in the model.
-
-ODataUriParser_InvalidCount='{0}' is not a valid count option.
-
-CastBinder_ChildTypeIsNotEntity=The child type '{0}' in a cast was not an entity type. Casts can only be performed on entity types.
-CastBinder_EnumOnlyCastToOrFromString=Enumeration type value can only be casted to or from string.
-Binder_IsNotValidEnumConstant=The string '{0}' is not a valid enumeration type constant.
-
-BatchReferenceSegment_InvalidContentID=Invalid content-id '{0}' for batch reference segment.
-
-SelectExpandBinder_UnknownPropertyType=Property '{0}' is of an unrecognized EdmPropertyKind.
-SelectExpandBinder_InvalidIdentifierAfterWildcard=It's not allowed to append '{0}' after wildcard.
-SelectExpandBinder_InvalidQueryOptionNestedSelection=It's not allowed to nest query options within '{0}' selection.
-SelectExpandBinder_SystemTokenInSelect=Found a system token, '{0}', while parsing a select clause.
-SelectionItemBinder_NoExpandForSelectedProperty=Only properties specified in $expand can be traversed in $select query options. Selected item was '{0}'.
-
-SelectExpandPathBinder_FollowNonTypeSegment=Trying to follow type segments on a segment that isn't a type. Segment was '{0}'.
-
-SelectBinder_MultiLevelPathInSelect=Found a path with multiple navigation properties or a bad complex property path in a select clause. Please reword your query such that each level of select or expand only contains either TypeSegments or Properties.
-
-ExpandItemBinder_TraversingANonNormalizedTree=Trying to traverse a non-normalized expand tree.
-ExpandItemBinder_CannotFindType=The type '{0}' is not defined in the model.
-ExpandItemBinder_PropertyIsNotANavigationPropertyOrComplexProperty=Property '{0}' on type '{1}' is not a navigation property or complex property. Only navigation properties can be expanded.
-ExpandItemBinder_TypeSegmentNotFollowedByPath=Found a path within a select or expand query option that isn't ended by a non-type segment.
-ExpandItemBinder_PathTooDeep=Trying to parse a type segment path that is too long.
-ExpandItemBinder_TraversingMultipleNavPropsInTheSamePath=Found a path traversing multiple navigation properties. Please rephrase the query such that each expand path contains only type segments and navigation properties.
-ExpandItemBinder_LevelsNotAllowedOnIncompatibleRelatedType=The $level option on navigation property '{0}' is not allowed, because the related entity type '{1}' could not be cast to source entity type '{2}'.
-ExpandItemBinder_InvaidSegmentInExpand=Segment '{0}' is not valid in expand path. Before navigation property, only type segment or entity or complex property can exist.
-
-Nodes_CollectionNavigationNode_MustHaveSingleMultiplicity=The navigation property must have a target multiplicity of 'One' or 'ZeroOrOne' to create a SingleNavigationNode.
-Nodes_NonentityParameterQueryNodeWithEntityType=An entity type '{0}' was given to NonEntityParameterQueryNode. Use EntityParameterQueryNode instead.
-Nodes_CollectionNavigationNode_MustHaveManyMultiplicity=The navigation property must have a target multiplicity of 'Many' to create a CollectionNavigationNode.
-Nodes_PropertyAccessShouldBeNonEntityProperty=A node of this kind requires the associated property to be a structural, non-collection type, but property '{0}' is not structural.
-Nodes_PropertyAccessTypeShouldNotBeCollection=A node of this kind requires the associated property to be a structural, non-collection type, but property '{0}' is a collection.
-Nodes_PropertyAccessTypeMustBeCollection=A node of this kind requires the associated property to be a structural, collection type, but property '{0}' is not a collection.
-Nodes_NonStaticEntitySetExpressionsAreNotSupportedInThisRelease=Only static Entity Set reference expressions are supported currently.
-Nodes_CollectionFunctionCallNode_ItemTypeMustBePrimitiveOrComplexOrEnum=An instance of CollectionFunctionCallNode can only be created with a primitive, complex or enum collection type. For functions returning a collection of entities, use EntityCollectionFunctionCallNode instead.
-Nodes_EntityCollectionFunctionCallNode_ItemTypeMustBeAnEntity=An instance of EntityCollectionFunctionCallNode can only be created with an entity collection type. For functions returning a collection of primitive or complex values, use CollectionFunctionCallNode instead.
-Nodes_SingleValueFunctionCallNode_ItemTypeMustBePrimitiveOrComplexOrEnum=An instance of SingleValueFunctionCallNode can only be created with a primitive, complex or enum type. For functions returning a single entity, use SingleEntityFunctionCallNode instead.
-Nodes_InNode_CollectionItemTypeMustBeSameAsSingleItemType=An instance of InNode can only be created where the item types of the right operand '{0}' and the left operand '{1}' can be compared.
-
-ExpandTreeNormalizer_NonPathInPropertyChain=Found a segment that isn't a path while parsing the path within a select or expand query option.
-SelectTreeNormalizer_MultipleSelecTermWithSamePathFound=Found multiple select terms with same select path '{0}' at one $select, please combine them together.
-
-UriExpandParser_TermIsNotValidForStar=Term '{0}' is not valid in a $expand expression, as only $level option is allowed when the expanded navigation property is star.
-UriExpandParser_TermIsNotValidForStarRef=Term '{0}' is not valid in a $expand expression, no option is allowed when the expanded navigation property is */$ref.
-UriExpandParser_ParentStructuredTypeIsNull=Cannot get parent structured type for term '{0}' to auto populate all navigation properties.
-UriExpandParser_TermWithMultipleStarNotAllowed=Term '{0}' is not valid in a $expand expression as multiple stars are not allowed.
-UriSelectParser_TermIsNotValid=Term '{0}' is not valid in a $select or $expand expression.
-UriSelectParser_InvalidTopOption=Top option must be a non-negative integer, it is set to '{0}' instead.
-UriSelectParser_InvalidSkipOption=Skip option must be a non-negative integer, it is set to '{0}' instead.
-UriSelectParser_InvalidCountOption=Count option must be a boolean value, it is set to '{0}' instead.
-UriSelectParser_InvalidLevelsOption=Levels option must be a non-negative integer or 'max', it is set to '{0}' instead.
-UriSelectParser_SystemTokenInSelectExpand=Found system token '{0}' in select or expand clause '{1}'.
-UriParser_MissingExpandOption=Missing expand option on navigation property '{0}'. If a parenthesis expression follows an expanded navigation property, then at least one expand option must be provided.
-UriParser_EmptyParenthesis=Empty parenthesis not allowed.
-UriParser_MissingSelectOption=Missing select option on property '{0}'. If a parenthesis expression follows a selected property, then at least one query option must be provided.
-UriParser_RelativeUriMustBeRelative=Parameter 'relativeUri' must be a relative Uri if serviceRoot is not specified.
-UriParser_NeedServiceRootForThisOverload=A service root URI must be provided to the ODataUriParser in order to use this method.
-UriParser_UriMustBeAbsolute=The URI '{0}' must be an absolute URI.
-UriParser_NegativeLimit=The limit must be greater than or equal to zero
-UriParser_ExpandCountExceeded=The result of parsing $expand contained at least {0} items, but the maximum allowed is {1}.
-UriParser_ExpandDepthExceeded=The result of parsing $expand was at least {0} items deep, but the maximum allowed is {1}.
-UriParser_TypeInvalidForSelectExpand=The type '{0}' is not valid for $select or $expand, only structured types are allowed.
-UriParser_ContextHandlerCanNotBeNull=The handler property for context '{0}' should not return null.
-UriParserMetadata_MultipleMatchingPropertiesFound=More than one properties match the name '{0}' were found in type '{1}'.
-UriParserMetadata_MultipleMatchingNavigationSourcesFound=More than one navigation sources match the name '{0}' were found in model.
-UriParserMetadata_MultipleMatchingTypesFound=More than one types match the name '{0}' were found in model.
-UriParserMetadata_MultipleMatchingKeysFound=More than one keys match the name '{0}' were found.
-UriParserMetadata_MultipleMatchingParametersFound=More than one parameters match the name '{0}' were found.
-UriValidator_ValidatorMustUseSameModelAsParser=The UrlValidator used to validate an ODataUri must use the same Model as the ODataUriParser.
-
-PathParser_EntityReferenceNotSupported=The request URI is not valid. $ref cannot be applied to the segment '{0}' since $ref can only follow an entity segment or entity collection segment.
-PathParser_CannotUseValueOnCollection=$value cannot be applied to a collection.
-PathParser_TypeMustBeRelatedToSet=The type '{0}' does not inherit from and is not a base type of '{1}'. The type of '{2}' must be related to the Type of the EntitySet.
-PathParser_TypeCastOnlyAllowedAfterStructuralCollection=Type cast segment '{0}' after a collection which is not of entity or complex type is not allowed.
-PathParser_TypeCastOnlyAllowedInDerivedTypeConstraint=Type cast segment '{0}' on {1} '{2}' is not allowed due to an Org.OData.Validation.V1.DerivedTypeConstraint annotation.
-
-ODataResourceSet_MustNotContainBothNextPageLinkAndDeltaLink=A resource set may contain a next page link, a delta link or neither, but must not contain both.
-
-ODataExpandPath_OnlyLastSegmentCanBeNavigationProperty=The last segment, and only the last segment, can be a navigation property in $expand.
-ODataExpandPath_LastSegmentMustBeNavigationPropertyOrTypeSegment=The last segment must be a navigation property or type segment in $expand.
-ODataExpandPath_InvalidExpandPathSegment=Found a segment of type '{0} in an expand path, but only NavigationProperty, Property and Type segments are allowed.
-
-ODataSelectPath_CannotOnlyHaveTypeSegment=TypeSegment cannot be the only segment in a $select.
-ODataSelectPath_InvalidSelectPathSegmentType=Found a segment of type '{0} in a select path, but only TypeSegment, NavigationPropertySegment, PropertySegment, OperationSegment or OpenPropertySegments are allowed.
-ODataSelectPath_OperationSegmentCanOnlyBeLastSegment=An operation can only be the last segment in $select.
-ODataSelectPath_NavPropSegmentCanOnlyBeLastSegment=A navigation property can only be the last segment in $select.
-
-RequestUriProcessor_TargetEntitySetNotFound=The target Entity Set of Navigation Property '{0}' could not be found. This is most likely an error in the IEdmModel.
-RequestUriProcessor_FoundInvalidFunctionImport=The function overloads matching '{0}' are invalid. This is most likely an error in the IEdmModel.
-
-OperationSegment_ReturnTypeForMultipleOverloads=No type could be computed for this Segment since there were multiple possible operations with varying return types.
-OperationSegment_CannotReturnNull=The return type from the operation is not possible with the given entity set.
-
-FunctionOverloadResolver_NoSingleMatchFound=Unable to resolve function overloads to a single function. There was more than one function in the model with name '{0}' and parameter names '{1}'.
-FunctionOverloadResolver_MultipleActionOverloads=Multiple action overloads were found with the same binding parameter for '{0}'.
-FunctionOverloadResolver_MultipleActionImportOverloads=Multiple action import overloads were found with the same binding parameter for '{0}'.
-FunctionOverloadResolver_MultipleOperationImportOverloads=Multiple action import and function import overloads for '{0}' were found.
-FunctionOverloadResolver_MultipleOperationOverloads=Multiple action and function overloads for '{0}' were found.
-FunctionOverloadResolver_FoundInvalidOperation=The operation overloads matching '{0}' are invalid. This is most likely an error in the IEdmModel.
-FunctionOverloadResolver_FoundInvalidOperationImport=The operation import overloads matching '{0}' are invalid. This is most likely an error in the IEdmModel.
-
-CustomUriFunctions_AddCustomUriFunction_BuiltInExistsNotAddingAsOverload=The given custom function '{0}' already exists as a Built-In function. Consider use 'addAsOverloadToBuiltInFunction = true' parameter.
-CustomUriFunctions_AddCustomUriFunction_BuiltInExistsFullSignature=The given custom function '{0}' already exists as a Built-In function in one of it's overloads. Thus cannot override the Built-In function.
-CustomUriFunctions_AddCustomUriFunction_CustomFunctionOverloadExists=The given function name '{0}' already exists as a custom function with the same overload.
-
-RequestUriProcessor_InvalidValueForEntitySegment=The ODataPathSegment provided (Id = {0}) is not an EntitySetSegment.
-RequestUriProcessor_InvalidValueForKeySegment=The KeySegment provided (Id = {0}) is either null, having no keys, or does not target a single resource.
-
-RequestUriProcessor_CannotApplyFilterOnSingleEntities=$filter path segment cannot be applied on single entities or singletons. Entity type: '{0}'.
-RequestUriProcessor_CannotApplyEachOnSingleEntities=$each set-based operation cannot be applied on single entities or singletons. Entity type: '{0}'.
-RequestUriProcessor_FilterPathSegmentSyntaxError=The $filter path segment must be in the form $filter(expression), where the expression resolves to a boolean.
-RequestUriProcessor_NoNavigationSourceFound=There are no navigation sources found to apply '{0}'.
-RequestUriProcessor_OnlySingleOperationCanFollowEachPathSegment=Only a single operation can follow $each.
-
-; Copied from the server, will be incrementally replaced.
-RequestUriProcessor_EmptySegmentInRequestUrl=Empty segment encountered in request URL. Please make sure that a valid request URL is specified.
-RequestUriProcessor_SyntaxError=Bad Request - Error in query syntax.
-RequestUriProcessor_CountOnRoot=The request URI is not valid, the segment $count cannot be applied to the root of the service.
-RequestUriProcessor_FilterOnRoot=The request URI is not valid, the segment $filter cannot be applied to the root of the service.
-RequestUriProcessor_EachOnRoot=The request URI is not valid, the segment $each cannot be applied to the root of the service.
-RequestUriProcessor_RefOnRoot=The request URI is not valid, the segment $ref cannot be applied to the root of the service.
-RequestUriProcessor_MustBeLeafSegment=The request URI is not valid. The segment '{0}' must be the last segment in the URI because it is one of the following: $ref, $batch, $count, $value, $metadata, a named media resource, an action, a noncomposable function, an action import, a noncomposable function import, an operation with void return type, or an operation import with void return type.
-RequestUriProcessor_LinkSegmentMustBeFollowedByEntitySegment=The request URI is not valid. The segment '{0}' must refer to a navigation property since the previous segment identifier is '{1}'.
-RequestUriProcessor_MissingSegmentAfterLink=The request URI is not valid. There must a segment specified after the '{0}' segment and the segment must refer to a entity resource.
-RequestUriProcessor_CountNotSupported=The request URI is not valid. $count cannot be applied to the segment '{0}' since $count can only follow an entity set, a collection navigation property, a structural property of collection type, an operation returning collection type or an operation import returning collection type.
-RequestUriProcessor_CannotQueryCollections=The request URI is not valid. Since the segment '{0}' refers to a collection, this must be the last segment in the request URI or it must be followed by an function or action that can be bound to it otherwise all intermediate segments must refer to a single resource.
-RequestUriProcessor_SegmentDoesNotSupportKeyPredicates=The request URI is not valid. The segment '{0}' cannot include key predicates, however it may end with empty parenthesis.
-RequestUriProcessor_ValueSegmentAfterScalarPropertySegment=The segment '{1}' in the request URI is not valid. The segment '{0}' refers to a primitive property, function, or service operation, so the only supported value from the next segment is '$value'.
-RequestUriProcessor_InvalidTypeIdentifier_UnrelatedType=The type '{0}' specified in the URI is neither a base type nor a sub-type of the previously-specified type '{1}'.
-OpenNavigationPropertiesNotSupportedOnOpenTypes=Open navigation properties are not supported on OpenTypes. Property name: '{0}'.
-BadRequest_ResourceCanBeCrossReferencedOnlyForBindOperation=Error processing request stream. In batch mode, a resource can be cross-referenced only for bind/unbind operations.
-DataServiceConfiguration_ResponseVersionIsBiggerThanProtocolVersion=The response requires that version {0} of the protocol be used, but the MaxProtocolVersion of the data service is set to {1}.
-BadRequest_KeyCountMismatch=The number of keys specified in the URI does not match number of key properties for the resource '{0}'.
-BadRequest_KeyMismatch=The key in the request URI is not valid for resource '{0}'. Ensure that the names and number of key properties match the declared key of the resource '{0}'.
-BadRequest_KeyOrAlternateKeyMismatch=The key in the request URI is not valid for resource '{0}'. Ensure that the names and number of key properties match the declared or alternate key properties for the resource '{0}'.
-RequestUriProcessor_KeysMustBeNamed=Segments with multiple key values must specify them in 'name=value' form.
-RequestUriProcessor_ResourceNotFound=Resource not found for the segment '{0}'.
-RequestUriProcessor_BatchedActionOnEntityCreatedInSameChangeset=Batched service action '{0}' cannot be invoked because it was bound to an entity created in the same changeset.
-RequestUriProcessor_Forbidden=Forbidden
-RequestUriProcessor_OperationSegmentBoundToANonEntityType=Found an operation bound to a non-entity type.
-RequestUriProcessor_NoBoundEscapeFunctionSupported=The request URI is not valid. The bound function binding to '{0}' does not match the composability of the escape function in the URI.
-RequestUriProcessor_EscapeFunctionMustHaveOneStringParameter=The UrlEscape function '{0}' must have exactly one non-binding parameter of type 'Edm.String'.
-RequestUriProcessor_ComposableEscapeFunctionShouldHaveValidParameter=A composable escape function must have a valid operation passed as a parameter.
-
-; Note: The below list of error messages are common to both the OData and the OData.Query project.
-General_InternalError=An internal error '{0}' occurred.
-
-ExceptionUtils_CheckIntegerNotNegative=A non-negative integer value was expected, but the value '{0}' is not a valid non-negative integer.
-ExceptionUtils_CheckIntegerPositive=A positive integer value was expected, but the value '{0}' is not a valid positive integer.
-ExceptionUtils_CheckLongPositive=A positive long value was expected; however, the value '{0}' is not a valid positive long value.
-ExceptionUtils_ArgumentStringNullOrEmpty=Value cannot be null or empty.
-
-ExpressionToken_OnlyRefAllowWithStarInExpand=Only $ref is allowed with star in $expand option.
-ExpressionToken_DollarCountNotAllowedInSelect=$count is not allowed in $select option.
-ExpressionToken_NoPropAllowedAfterDollarCount=No property is allowed after $count segment.
-ExpressionToken_NoPropAllowedAfterRef=No property is allowed after $ref segment.
-ExpressionToken_NoSegmentAllowedBeforeStarInExpand=No segment is allowed before star in $expand.
-ExpressionToken_IdentifierExpected=An identifier was expected at position {0}.
-
-ExpressionLexer_UnterminatedStringLiteral=There is an unterminated string literal at position {0} in '{1}'.
-ExpressionLexer_InvalidCharacter=Syntax error: character '{0}' is not valid at position {1} in '{2}'.
-ExpressionLexer_SyntaxError=Syntax error at position {0} in '{1}'.
-ExpressionLexer_UnterminatedLiteral=There is an unterminated literal at position {0} in '{1}'.
-ExpressionLexer_DigitExpected=A digit was expected at position {0} in '{1}'.
-ExpressionLexer_UnbalancedBracketExpression=Found an unbalanced bracket expression.
-ExpressionLexer_InvalidNumericString=Numeric string '{0}' is not a valid Int32/Int64/Double/Decimal.
-ExpressionLexer_InvalidEscapeSequence=An unrecognized escape sequence '\\{0}' was found at position {1} in '{2}'.
-
-UriQueryExpressionParser_UnrecognizedLiteral=Unrecognized '{0}' literal '{1}' at '{2}' in '{3}'.
-UriQueryExpressionParser_UnrecognizedLiteralWithReason=Unrecognized '{0}' literal '{1}' at '{2}' in '{3}' with reason '{4}'.
-
-UriPrimitiveTypeParsers_FailedToParseTextToPrimitiveValue=Failed to parse '{0}' of Edm type '{1}' to primitive type.
-UriPrimitiveTypeParsers_FailedToParseStringToGeography=Failed to parse string to Geography.
-
-UriCustomTypeParsers_AddCustomUriTypeParserAlreadyExists=The given uri custom type parser already exists.
-UriCustomTypeParsers_AddCustomUriTypeParserEdmTypeExists=An existing custom UriTypeParser is already registered to the given EdmTypeReference '{0}'.
-
-UriParserHelper_InvalidPrefixLiteral=The given type prefix literal name '{0}' must contain letters or '.' only.
-
-CustomUriTypePrefixLiterals_AddCustomUriTypePrefixLiteralAlreadyExists=The given type literal prefix '{0}' already exists as a custom uri type literal prefix.
-
-; NOTE: these error messages are copied from EdmLib because they appear in shared source files.
-ValueParser_InvalidDuration=The value '{0}' is not a valid duration value.
-
-; Note: The below list of error messages are common to the ODataLib, EdmLib, Spatial, Server and Client projects.
-PlatformHelper_DateTimeOffsetMustContainTimeZone=The time zone information is missing on the DateTimeOffset value '{0}'. A DateTimeOffset value must contain the time zone information.
-
-
-; Note: The below list of error messages are common to both the OData and the Spatial project.
-
-JsonReader_UnexpectedComma=Invalid JSON. An unexpected comma was found in scope '{0}'. A comma is only valid between properties of an object or between elements of an array.
-JsonReader_ArrayClosureMismatch=Invalid JSON. A array closure mismatch occurred. A '{0}' was expected to match '{1}', but instead '{2}' was found.
-JsonReader_MultipleTopLevelValues=Invalid JSON. More than one value was found at the root of the JSON content. JSON content can only have one value at the root level, which is an array, an object or a primitive value.
-JsonReader_EndOfInputWithOpenScope=Invalid JSON. Unexpected end of input was found in JSON content. Not all object and array scopes were closed.
-JsonReader_UnexpectedToken=Invalid JSON. Unexpected token '{0}'.
-JsonReader_UnrecognizedToken=Invalid JSON. A token was not recognized in the JSON content.
-JsonReader_MissingColon=Invalid JSON. A colon character ':' is expected after the property name '{0}', but none was found.
-JsonReader_UnrecognizedEscapeSequence=Invalid JSON. An unrecognized escape sequence '{0}' was found in a JSON string value.
-JsonReader_UnexpectedEndOfString=Invalid JSON. Unexpected end of input reached while processing a JSON string value.
-JsonReader_InvalidNumberFormat=Invalid JSON. The value '{0}' is not a valid number.
-JsonReader_InvalidBinaryFormat=Invalid Binary value. The value '{0}' is not a valid Base64 encoded value.
-JsonReader_MissingComma=Invalid JSON. A comma character ',' was expected in scope '{0}'. Every two elements in an array and properties of an object must be separated by commas.
-JsonReader_InvalidPropertyNameOrUnexpectedComma=Invalid JSON. The property name '{0}' is not valid. The name of a property cannot be empty.
-JsonReader_MaxBufferReached=Cannot increase the JSON reader buffer to hold the input JSON which has very long token.
-JsonReader_CannotAccessValueInStreamState=Cannot access the Value property while streaming a value. Please dispose the StreamReader or TextReader before continuing.
-JsonReader_CannotCallReadInStreamState=Cannot call Read while streaming a value. Please dispose the StreamReader or TextReader before continuing.
-JsonReader_CannotCreateReadStream=Cannot create a Stream in the current state. A Stream can only be created for reading a JSON string value when positioned on, and before accessing, the value.
-JsonReader_CannotCreateTextReader=Cannot create a TextReader in the current state. A TextReader can only be created for reading a JSON string value when positioned on, and before accessing, the value.
-
-JsonReaderExtensions_UnexpectedNodeDetected=An unexpected '{1}' node was found when reading from the JSON reader. A '{0}' node was expected.
-JsonReaderExtensions_UnexpectedNodeDetectedWithPropertyName=An unexpected '{1}' node was found for property named '{2}' when reading from the JSON reader. A '{0}' node was expected.
-JsonReaderExtensions_CannotReadPropertyValueAsString=Cannot read the value '{0}' for the property '{1}' as a quoted JSON string value.
-JsonReaderExtensions_CannotReadValueAsString=Cannot read the value '{0}' as a quoted JSON string value.
-JsonReaderExtensions_CannotReadValueAsDouble=Cannot read the value '{0}' as a double numeric value.
-JsonReaderExtensions_UnexpectedInstanceAnnotationName=An unexpected instance annotation name '{0}' was found when reading from the JSON reader, In OData, Instance annotation name must start with @.
-
-BufferUtils_InvalidBufferOrSize=The buffer from pool cannot be null or less than the required minimal size '{0}'.
-
-ServiceProviderExtensions_NoServiceRegistered=No service for type '{0}' has been registered.
-
-TypeUtils_TypeNameIsNotQualified=The value '{0}' is not a qualified type name. A qualified type name is expected.
diff --git a/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchFormat.cs b/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchFormat.cs
index 12b8e363b1..95ddb66386 100644
--- a/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchFormat.cs
+++ b/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchFormat.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.MultipartMixed
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -152,7 +153,7 @@ internal override string GetContentType(ODataMediaType mediaType, Encoding encod
if (boundaryParameters.Count() > 1)
{
throw new ODataContentTypeException(
- Strings.MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified(mediaType.ToText()));
+ Error.Format(SRResources.MediaTypeUtils_NoOrMoreThanOneContentTypeSpecified, mediaType.ToText()));
}
else if (boundaryParameters.Count() == 1)
{
diff --git a/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchReader.cs b/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchReader.cs
index 0c7e15c33e..00c2081472 100644
--- a/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchReader.cs
+++ b/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchReader.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.MultipartMixed
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -85,7 +86,7 @@ protected override ODataBatchOperationRequestMessage CreateOperationRequestMessa
if (this.currentContentId == null)
{
- throw new ODataException(Strings.ODataBatchOperationHeaderDictionary_KeyNotFound(ODataConstants.ContentIdHeader));
+ throw new ODataException(Error.Format(SRResources.ODataBatchOperationHeaderDictionary_KeyNotFound, ODataConstants.ContentIdHeader));
}
}
}
@@ -178,7 +179,7 @@ protected override ODataBatchReaderState ReadAtChangesetStartImplementation()
{
if (this.batchStream.ChangeSetBoundary == null)
{
- ThrowODataException(Strings.ODataBatchReader_ReaderStreamChangesetBoundaryCannotBeNull);
+ ThrowODataException(SRResources.ODataBatchReader_ReaderStreamChangesetBoundaryCannotBeNull);
}
this.dependsOnIdsTracker.ChangeSetStarted();
@@ -208,7 +209,7 @@ protected override void ValidateDependsOnIds(string contentId, IEnumerable
@@ -328,7 +329,7 @@ internal override int ReadWithDelimiter(byte[] userBuffer, int userBufferOffset,
}
}
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStream_ReadWithDelimiter));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStream_ReadWithDelimiter));
}
///
@@ -374,7 +375,7 @@ internal override int ReadWithLength(byte[] userBuffer, int userBufferOffset, in
// We cannot fully satisfy the read request since there are not enough bytes in the stream.
// This means that the content length of the stream was incorrect; this should never happen
// since the caller should already have checked this.
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStreamBuffer_ReadWithLength));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStreamBuffer_ReadWithLength));
}
else
{
@@ -451,7 +452,7 @@ internal ODataBatchOperationHeaders ReadHeaders()
if (headers.ContainsKeyOrdinal(headerName))
{
- throw new ODataException(Strings.ODataBatchReaderStream_DuplicateHeaderFound(headerName));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStream_DuplicateHeaderFound, headerName));
}
headers.Add(headerName, headerValue);
@@ -476,7 +477,7 @@ internal string ReadFirstNonEmptyLine()
// null indicates end of input, which is unexpected at this point.
if (line == null)
{
- throw new ODataException(Strings.ODataBatchReaderStream_UnexpectedEndOfInput);
+ throw new ODataException(SRResources.ODataBatchReaderStream_UnexpectedEndOfInput);
}
}
while (line.Length == 0);
@@ -497,7 +498,7 @@ private static void ValidateHeaderLine(string headerLine, out string headerName,
int colon = headerLine.IndexOf(':', StringComparison.Ordinal);
if (colon <= 0)
{
- throw new ODataException(Strings.ODataBatchReaderStream_InvalidHeaderSpecified(headerLine));
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStream_InvalidHeaderSpecified, headerLine));
}
headerName = headerLine.Substring(0, colon).Trim();
@@ -601,7 +602,7 @@ private string ReadLine()
this.BatchBuffer.SkipTo(lineEndEndPosition + 1);
break;
default:
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataBatchReaderStream_ReadLine));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataBatchReaderStream_ReadLine));
}
}
@@ -639,7 +640,7 @@ private ODataBatchOperationHeaders ValidatePartHeaders(ODataBatchOperationHeader
string contentType;
if (!headers.TryGetValue(ODataConstants.ContentTypeHeader, out contentType))
{
- throw new ODataException(Strings.ODataBatchReaderStream_MissingContentTypeHeader);
+ throw new ODataException(SRResources.ODataBatchReaderStream_MissingContentTypeHeader);
}
if (MediaTypeUtils.MediaTypeAndSubtypeAreEqual(contentType, MimeConstants.MimeApplicationHttp))
@@ -652,7 +653,7 @@ private ODataBatchOperationHeaders ValidatePartHeaders(ODataBatchOperationHeader
if (!headers.TryGetValue(ODataConstants.ContentTransferEncoding, out transferEncoding) ||
string.Compare(transferEncoding, ODataConstants.BatchContentTransferEncoding, StringComparison.OrdinalIgnoreCase) != 0)
{
- throw new ODataException(Strings.ODataBatchReaderStream_MissingOrInvalidContentEncodingHeader(
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStream_MissingOrInvalidContentEncodingHeader,
ODataConstants.ContentTransferEncoding,
ODataConstants.BatchContentTransferEncoding));
}
@@ -664,12 +665,12 @@ private ODataBatchOperationHeaders ValidatePartHeaders(ODataBatchOperationHeader
if (this.changesetBoundary != null)
{
// Nested changesets are not supported
- throw new ODataException(Strings.ODataBatchReaderStream_NestedChangesetsAreNotSupported);
+ throw new ODataException(SRResources.ODataBatchReaderStream_NestedChangesetsAreNotSupported);
}
}
else
{
- throw new ODataException(Strings.ODataBatchReaderStream_InvalidContentTypeSpecified(
+ throw new ODataException(Error.Format(SRResources.ODataBatchReaderStream_InvalidContentTypeSpecified,
ODataConstants.ContentTypeHeader,
contentType,
MimeConstants.MimeMultipartMixed,
diff --git a/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchWriter.cs b/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchWriter.cs
index 2e569274d6..fb2a02fb3b 100644
--- a/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchWriter.cs
+++ b/src/Microsoft.OData.Core/MultipartMixed/ODataMultipartMixedBatchWriter.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData.MultipartMixed
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -165,7 +166,7 @@ public override void OnInStreamError()
// The OData protocol spec does not define the behavior when an exception is encountered outside of a batch operation. The batch writer
// should not allow WriteError in this case. Note that WCF DS Server does serialize the error in XML format when it encounters one outside of a
// batch operation.
- throw new ODataException(Strings.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
}
public override async Task OnInStreamErrorAsync()
@@ -178,7 +179,7 @@ await this.RawOutputContext.TextWriter.FlushAsync()
// The OData protocol spec does not define the behavior when an exception is encountered outside of a batch operation. The batch writer
// should not allow WriteError in this case. Note that WCF DS Server does serialize the error in XML format when it encounters one outside of a
// batch operation.
- throw new ODataException(Strings.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
+ throw new ODataException(SRResources.ODataBatchWriter_CannotWriteInStreamErrorForBatch);
}
///
@@ -249,7 +250,7 @@ protected override void ValidateDependsOnIds(string contentId, IEnumerable ReadHeaders()
if (headers.ContainsKey(headerName))
{
- throw new ODataException(Strings.ODataAsyncReader_DuplicateHeaderFound(headerName));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_DuplicateHeaderFound, headerName));
}
headers.Add(headerName, headerValue);
@@ -253,7 +254,7 @@ private static void ValidateHeaderLine(string headerLine, out string headerName,
int colon = headerLine.IndexOf(':', StringComparison.Ordinal);
if (colon <= 0)
{
- throw new ODataException(Strings.ODataAsyncReader_InvalidHeaderSpecified(headerLine));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_InvalidHeaderSpecified, headerLine));
}
headerName = headerLine.Substring(0, colon).Trim();
@@ -274,7 +275,7 @@ private string ReadLine()
{
if (ch == '\n')
{
- throw new ODataException(Strings.ODataAsyncReader_InvalidNewLineEncountered('\n'));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_InvalidNewLineEncountered, '\n'));
}
if (ch == '\r')
@@ -283,7 +284,7 @@ private string ReadLine()
if (ch != '\n')
{
- throw new ODataException(Strings.ODataAsyncReader_InvalidNewLineEncountered('\r'));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_InvalidNewLineEncountered, '\r'));
}
return lineBuilder.ToString();
@@ -293,7 +294,7 @@ private string ReadLine()
ch = this.ReadByte();
}
- throw new ODataException(Strings.ODataAsyncReader_UnexpectedEndOfInput);
+ throw new ODataException(SRResources.ODataAsyncReader_UnexpectedEndOfInput);
}
///
@@ -389,7 +390,7 @@ private async Task> ReadHeadersAsync()
if (headers.ContainsKey(headerName))
{
- throw new ODataException(Strings.ODataAsyncReader_DuplicateHeaderFound(headerName));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_DuplicateHeaderFound, headerName));
}
headers.Add(headerName, headerValue);
@@ -418,7 +419,7 @@ private async Task ReadLineAsync()
{
if (ch == '\n')
{
- throw new ODataException(Strings.ODataAsyncReader_InvalidNewLineEncountered('\n'));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_InvalidNewLineEncountered, '\n'));
}
if (ch == '\r')
@@ -428,7 +429,7 @@ private async Task ReadLineAsync()
if (ch != '\n')
{
- throw new ODataException(Strings.ODataAsyncReader_InvalidNewLineEncountered('\r'));
+ throw new ODataException(Error.Format(SRResources.ODataAsyncReader_InvalidNewLineEncountered, '\r'));
}
return lineBuilder.ToString();
@@ -439,7 +440,7 @@ private async Task ReadLineAsync()
.ConfigureAwait(false);
}
- throw new ODataException(Strings.ODataAsyncReader_UnexpectedEndOfInput);
+ throw new ODataException(SRResources.ODataAsyncReader_UnexpectedEndOfInput);
}
///
diff --git a/src/Microsoft.OData.Core/ODataAsynchronousResponseMessage.cs b/src/Microsoft.OData.Core/ODataAsynchronousResponseMessage.cs
index 8756cd93e6..30ee9694ed 100644
--- a/src/Microsoft.OData.Core/ODataAsynchronousResponseMessage.cs
+++ b/src/Microsoft.OData.Core/ODataAsynchronousResponseMessage.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Collections.Generic;
@@ -276,7 +277,7 @@ private void VerifyCanSetHeaderAndStatusCode()
{
if (!this.writing)
{
- throw new ODataException(Strings.ODataAsyncResponseMessage_MustNotModifyMessage);
+ throw new ODataException(SRResources.ODataAsyncResponseMessage_MustNotModifyMessage);
}
}
}
diff --git a/src/Microsoft.OData.Core/ODataAsynchronousWriter.cs b/src/Microsoft.OData.Core/ODataAsynchronousWriter.cs
index f28c7051a0..aab7cd2586 100644
--- a/src/Microsoft.OData.Core/ODataAsynchronousWriter.cs
+++ b/src/Microsoft.OData.Core/ODataAsynchronousWriter.cs
@@ -6,6 +6,7 @@
namespace Microsoft.OData
{
+ using Microsoft.OData.Core;
#region Namespaces
using System;
using System.Diagnostics;
@@ -98,7 +99,7 @@ void IODataOutputInStreamErrorListener.OnInStreamError()
this.rawOutputContext.VerifyNotDisposed();
this.rawOutputContext.TextWriter.Flush();
- throw new ODataException(Strings.ODataAsyncWriter_CannotWriteInStreamErrorForAsync);
+ throw new ODataException(SRResources.ODataAsyncWriter_CannotWriteInStreamErrorForAsync);
}
///
@@ -108,7 +109,7 @@ async Task IODataOutputInStreamErrorListener.OnInStreamErrorAsync()
await this.rawOutputContext.TextWriter.FlushAsync()
.ConfigureAwait(false);
- throw new ODataException(Strings.ODataAsyncWriter_CannotWriteInStreamErrorForAsync);
+ throw new ODataException(SRResources.ODataAsyncWriter_CannotWriteInStreamErrorForAsync);
}
///
@@ -129,14 +130,14 @@ private void VerifyCallAllowed(bool synchronousCall)
{
if (!this.rawOutputContext.Synchronous)
{
- throw new ODataException(Strings.ODataAsyncWriter_SyncCallOnAsyncWriter);
+ throw new ODataException(SRResources.ODataAsyncWriter_SyncCallOnAsyncWriter);
}
}
else
{
if (this.rawOutputContext.Synchronous)
{
- throw new ODataException(Strings.ODataAsyncWriter_AsyncCallOnSyncWriter);
+ throw new ODataException(SRResources.ODataAsyncWriter_AsyncCallOnSyncWriter);
}
}
}
@@ -162,12 +163,12 @@ private void VerifyCanCreateResponseMessage(bool synchronousCall)
if (!this.rawOutputContext.WritingResponse)
{
- throw new ODataException(Strings.ODataAsyncWriter_CannotCreateResponseWhenNotWritingResponse);
+ throw new ODataException(SRResources.ODataAsyncWriter_CannotCreateResponseWhenNotWritingResponse);
}
if (responseMessageCreated)
{
- throw new ODataException(Strings.ODataAsyncWriter_CannotCreateResponseMoreThanOnce);
+ throw new ODataException(SRResources.ODataAsyncWriter_CannotCreateResponseMoreThanOnce);
}
}
diff --git a/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs b/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs
index b1cabd52dc..9494e34beb 100644
--- a/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs
+++ b/src/Microsoft.OData.Core/ODataCollectionReaderCore.cs
@@ -12,6 +12,7 @@ namespace Microsoft.OData
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
using Microsoft.OData.Metadata;
#endregion Namespaces
@@ -185,7 +186,7 @@ protected bool ReadImplementation()
default:
Debug.Assert(false, "Unsupported collection reader state " + this.State + " detected.");
- throw new ODataException(Strings.General_InternalError(InternalErrorCodes.ODataCollectionReaderCore_ReadImplementation));
+ throw new ODataException(Error.Format(SRResources.General_InternalError, InternalErrorCodes.ODataCollectionReaderCore_ReadImplementation));
}
return result;
@@ -368,7 +369,7 @@ private void VerifyCanRead(bool synchronousCall)
if (this.State == ODataCollectionReaderState.Exception || this.State == ODataCollectionReaderState.Completed)
{
- throw new ODataException(Strings.ODataCollectionReaderCore_ReadOrReadAsyncCalledInInvalidState(this.State));
+ throw new ODataException(Error.Format(SRResources.ODataCollectionReaderCore_ReadOrReadAsyncCalledInInvalidState, this.State));
}
}
@@ -395,7 +396,7 @@ private void VerifySynchronousCallAllowed()
{
if (!this.inputContext.Synchronous)
{
- throw new ODataException(Strings.ODataCollectionReaderCore_SyncCallOnAsyncReader);
+ throw new ODataException(SRResources.ODataCollectionReaderCore_SyncCallOnAsyncReader);
}
}
@@ -406,7 +407,7 @@ private void VerifyAsynchronousCallAllowed()
{
if (this.inputContext.Synchronous)
{
- throw new ODataException(Strings.ODataCollectionReaderCore_AsyncCallOnSyncReader);
+ throw new ODataException(SRResources.ODataCollectionReaderCore_AsyncCallOnSyncReader);
}
}
diff --git a/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs b/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs
index 7bdaacbdd0..0fe85cd0e0 100644
--- a/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs
+++ b/src/Microsoft.OData.Core/ODataCollectionReaderCoreAsync.cs
@@ -10,6 +10,7 @@ namespace Microsoft.OData
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
+ using Microsoft.OData.Core;
using Microsoft.OData.Edm;
#endregion Namespaces
@@ -80,7 +81,7 @@ protected override Task ReadAsynchronously()
default:
Debug.Assert(false, "Unsupported collection reader state " + this.State + " detected.");
- return TaskUtils.GetFaultedTask