Class RemoteRepoPath
Abstracts GitHub origin repository paths formatted like: [SERVER/]OWNER/REPO.
Examples: github.com/owner/repo or owner/repo (where github.com is the implied server).
Namespace: Neon.GitHub
Assembly: Neon.GitHub.dll
Syntax
public class RemoteRepoPath
Properties
Name
Returns the name of the repository.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Owner
Returns the owner part of the path.
Declaration
public string Owner { get; }
Property Value
Type | Description |
---|---|
string |
Server
Returns the server part of the path.
Declaration
public string Server { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
Parse(string)
Parses a GitHub repository path.
Declaration
public static RemoteRepoPath Parse(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path, like: [SERVER/]OWNER/REPO |
Returns
Type | Description |
---|---|
RemoteRepoPath | The parsed RemoteRepoPath. |
Remarks
note
github.com will be assumed when no server is specified.
Exceptions
Type | Condition |
---|---|
FormatException | Thrown when the input is invalid. |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
Operators
operator ==(RemoteRepoPath, RemoteRepoPath)
Equality operator.
Declaration
public static bool operator ==(RemoteRepoPath v1, RemoteRepoPath v2)
Parameters
Type | Name | Description |
---|---|---|
RemoteRepoPath | v1 | Specifies the first value. |
RemoteRepoPath | v2 | Specifies the second value. |
Returns
Type | Description |
---|---|
bool |
|
operator !=(RemoteRepoPath, RemoteRepoPath)
Inequality operator.
Declaration
public static bool operator !=(RemoteRepoPath v1, RemoteRepoPath v2)
Parameters
Type | Name | Description |
---|---|---|
RemoteRepoPath | v1 | Specifies the first value. |
RemoteRepoPath | v2 | Specifies the second value. |
Returns
Type | Description |
---|---|
bool |
|