小编Hec*_* Jr的帖子

使用System.Diagnostics.Process在命令行上的文件中管道

我正在尝试运行命令行程序并在文件中管道.该命令在命令行上运行正常,但我似乎无法使用C#中的Process对象.这是我发出的命令:

"C:\ Servers\CollabNet Subversion Server\svnadmin"加载C:\ Repositories\TestLoad <C:\ Temp\test.dump

除了上面的命令之外,此函数适用于我传递给它的所有其他命令:

public static bool ExecuteSvnCommand( string command, string arguments, out string result, out string errors )
{
    bool retval = false;
    string output = string.Empty;
    string errorLines = string.Empty;
    Process svnCommand = null;
    var psi = new ProcessStartInfo( command );

    psi.RedirectStandardOutput = true;
    psi.RedirectStandardError = true;
    psi.WindowStyle = ProcessWindowStyle.Hidden;
    psi.UseShellExecute = false;
    psi.CreateNoWindow = true;

    try
    {
        Process.Start( psi );
        psi.Arguments = arguments;
        svnCommand = Process.Start( psi );

        StreamReader myOutput = svnCommand.StandardOutput; …
Run Code Online (Sandbox Code Playgroud)

c# command-line

8
推荐指数
2
解决办法
7699
查看次数

将C#COM服务器事件暴露给Delphi客户端应用程序

我的问题与这两个问题非常相似:

C#组件事件?

C# - 编写COM服务器 - 未在客户端上触发的事件

然而,对他们有用的东西并不适合我.类型库文件没有任何事件定义提示,因此Delphi没有看到它.正如您所料,该类适用于其他C#应用程序.

COM服务器工具:

  • Visual Studio 2010
  • .NET 4.0

Delphi应用程序:

  • Delphi 2010
  • 德尔福7

这是代码的简化版本:

 /// <summary>
/// Call has arrived delegate.
/// </summary>
[ComVisible(false)]
public delegate void CallArrived(object sender, string callData);

/// <summary>
/// Interface to expose SimpleAgent events to COM
/// </summary>
[ComVisible(true)]
[GuidAttribute("1FFBFF09-3AF0-4F06-998D-7F4B6CB978DD")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface IAgentEvents
{
    ///<summary>
    /// Handles incoming calls from the predictive manager.
    ///</summary>
    ///<param name="sender">The class that initiated this event</param>
    ///<param name="callData">The data associated with the incoming call.</param> …
Run Code Online (Sandbox Code Playgroud)

c# delphi com .net-4.0

4
推荐指数
1
解决办法
3835
查看次数

如何摆脱MMC 3.0管理单元中的"控制台根"节点?

我一直用新的MMC 3.0类和C#创建snapins.我似乎无法找到在创建*.msc文件时如何摆脱"控制台根"节点的任何示例.我查看了SDK中的示例,但我似乎无法找到任何内容.

我看过其他的snapins做我想要的,但我不知道他们正在使用什么版本的MMC.

c# mmc3 mmc

3
推荐指数
1
解决办法
2304
查看次数

左连接中的Where子句使用相关查询?

这是查询:

SELECT c.Name As CompanyName, j.ID as JobID, j.Title as JobTitle, 
ja.ApplicationDate, DATEDIFF(MONTH,ja.ApplicationDate, GETDATE()) AS MonthsAgo,
jsc.Name As Recruiter, js.Name As RecruitingAgency, jsh.Name As LastStatus
FROM Companies c
JOIN Jobs j 
ON c.ID = j.CompanyID
JOIN JobApplications ja
ON j.ID = ja.JobID
LEFT JOIN JobContact jsc
ON jsc.ID = j.JobSourceContactID
LEFT JOIN JobContactCompany js
ON jsc.JobSourceCompanyID = js.ID
LEFT JOIN (
    SELECT TOP 1 jh.JobID, jh.StatusDate, jt.Name
    FROM JobStatusHistory jh
    JOIN JobStatusTypes jt
    ON jh.JobStatusTypeID = jt.ID
    --WHERE jh.JobID = …
Run Code Online (Sandbox Code Playgroud)

sql t-sql sql-server-2008 correlated-subquery

3
推荐指数
1
解决办法
2224
查看次数

带有SVN工具的Windows phone 7开发人员工具

我们是一个约50人的团队,我们的机器上安装了窗口电话开发工具(7.0),但我们没有安装visual studio.

有没有可用的SVN工具可以与windows phone开发工具集成,可以提供签入和签出等服务.

最好是免费软件

感谢致敬.

mohit leekha

svn windows-phone-7

1
推荐指数
1
解决办法
330
查看次数