Skip to content

Commit

Permalink
closes #226; remote repository location is optional for COM clients
Browse files Browse the repository at this point in the history
  • Loading branch information
rubberduck203 committed Mar 8, 2015
1 parent f6cc9d0 commit 46b7e2e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions RetailCoder.VBE/Interop/SourceControlClassFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface _ISourceControlClassFactory
ISourceControlProvider CreateGitProvider(VBProject project, [Optional] IRepository repository, [Optional] string userName, [Optional] string passWord);

[DispId(2)]
IRepository CreateRepository(string name, string localDirectory, string remotePathOrUrl);
IRepository CreateRepository(string name, string localDirectory, [Optional] string remotePathOrUrl);
}

[ComVisible(true)]
Expand Down Expand Up @@ -44,8 +44,13 @@ public ISourceControlProvider CreateGitProvider(VBProject project, [Optional] IR
}

[Description("Returns new instance of repository struct.")]
public IRepository CreateRepository(string name, string localDirectory, string remotePathOrUrl)
public IRepository CreateRepository(string name, string localDirectory, [Optional] string remotePathOrUrl)
{
if (remotePathOrUrl == null)
{
remotePathOrUrl = string.Empty;
}

return new Repository(name, localDirectory, remotePathOrUrl);
}
}
Expand Down

0 comments on commit 46b7e2e

Please sign in to comment.