-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f369378
commit aa2c3a1
Showing
16 changed files
with
429 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
//--------------------------------------------------------------------- | ||
// <copyright file="EdmStructuralPropertyAlias.cs" company="Microsoft"> | ||
// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. | ||
// </copyright> | ||
//--------------------------------------------------------------------- | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.OData.Edm | ||
{ | ||
/// <summary> | ||
/// Represents an EDM structural (i.e. non-navigation) property with an alias. | ||
/// </summary> | ||
public class EdmStructuralPropertyAlias : EdmProperty, IEdmStructuralPropertyAlias | ||
{ | ||
private string alias; | ||
private IEnumerable<string> path; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="EdmStructuralPropertyAlias"/> class. | ||
/// </summary> | ||
/// <param name="declaringType">The type that owns this property.</param> | ||
/// <param name="name">Name of the property.</param> | ||
/// <param name="type">The type of the property.</param> | ||
/// <param name="alias">The property alias.</param> | ||
/// <param name="path">The path to the referenced property.</param> | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "string", Justification = "defaultValue might be confused for an IEdmValue.")] | ||
public EdmStructuralPropertyAlias(IEdmStructuredType declaringType, string name, IEdmTypeReference type, string alias, IEnumerable<string> path) | ||
: base(declaringType, name, type) | ||
{ | ||
this.alias = alias; | ||
this.path = path; | ||
} | ||
|
||
public string PropertyAlias | ||
{ | ||
get { return this.alias; } | ||
|
||
} | ||
public IEnumerable<string> Path | ||
{ | ||
get { return this.path; } | ||
} | ||
|
||
/// <summary> | ||
/// Gets the default value of this property. | ||
/// </summary> | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", Justification = "defaultValue might be confused for an IEdmValue.")] | ||
public string DefaultValueString | ||
{ | ||
get; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the kind of this property. | ||
/// </summary> | ||
public override EdmPropertyKind PropertyKind | ||
{ | ||
get { return EdmPropertyKind.Structural; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//--------------------------------------------------------------------- | ||
// <copyright file="IEdmStructuralPropertyAlias.cs" company="Microsoft"> | ||
// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. | ||
// </copyright> | ||
//--------------------------------------------------------------------- | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.OData.Edm | ||
{ | ||
/// <summary> | ||
/// Represents a property alias. | ||
/// </summary> | ||
public interface IEdmStructuralPropertyAlias : IEdmStructuralProperty | ||
{ | ||
/// <summary> | ||
/// The path to the property. | ||
/// </summary> | ||
IEnumerable<string> Path { get; } | ||
|
||
/// <summary> | ||
/// The property alias. | ||
/// </summary> | ||
string PropertyAlias { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.