Show / Hide Table of Contents

Class GitRepositoryNavigation

This static class presently exposes a single method that discovers the name of the root directory of the Git repository that contains the current working directory or the directory specified by the caller.

Inheritance
System.Object
GitRepositoryNavigation
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: WizardWrx.Core
Assembly: WizardWrx.Core.dll
Syntax
public class GitRepositoryNavigation

Methods

| Improve this Doc View Source

DiscoverRepoRoot(String)

Call this method to discover the name of the root directory of the Git repository that contains the current working directory or the directory specified by the caller.

Declaration
public static string DiscoverRepoRoot(string pstrStartDirectoryName)
Parameters
Type Name Description
System.String pstrStartDirectoryName

This optional string identifies the directory from which to start the search. If null, the starting point is either the value of the WWREBASEPATHS_REPOROOT environment variable or the current working directory.

Returns
Type Description
System.String

If it succeeds, the returnd string represents the name of the root directory of the current Git repository. Otherwise, the method raises an InvalidOperationException.

Remarks

This method wraps the internal shared implementation and provides localized error messages using this assembly’s resource set.

If the repository root cannot be determined, this method throws an System.InvalidOperationException whose message is formatted using Properties.Resources.IDS_REPOSITORY_ROOT_NOT_FOUND.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX