Skip to content

[API Proposal]: Use TimeSpan everywhere we use an int for seconds, milliseconds and timeouts #1602

Closed

Description

@deeprobin

I extracted this proposal from dotnet/runtime#67156:

namespace System.Data.Sql {
    public sealed class SqlNotificationRequest {
       public TimeSpan TimeoutTimeSpan { get; set; }
    }
}

namespace System.Data.SqlClient {
    public sealed class SqlBulkCopy {
       public TimeSpan BulkCopyTimeoutTimeSpan { get; set; }
    }

    public sealed class SqlConnectionStringBuilder {
       public TimeSpan ConnectTimeoutTimeSpan { get; set; }
       public TimeSpan LoadBalanceTimeoutTimeSpan { get; set; }
    }

    public sealed class SqlDependency {
       public SqlDependency(SqlCommand command, string options, TimeSpan timeout);
    }
}

Activity

  1. ErikEJ commented on May 3, 2022

    @ErikEJ
    Contributor

    CommandTimeout ?

  2. deeprobin commented on May 3, 2022

    @deeprobin
    Author

    @ErikEJ Thats described in the runtime issue because thats part of System.Data.Common iirc

  3. changed the title [-][API Proposal]: Use Timespan everywhere we use an int for seconds, milliseconds and timeouts[/-] [+][API Proposal]: Use `TimeSpan` everywhere we use an int for seconds, milliseconds and timeouts[/+] on May 3, 2022
  4. ErikEJ commented on May 3, 2022

    @ErikEJ
    Contributor

    SqlConnectionString.CommandTimeout

  5. deeprobin commented on May 3, 2022

    @deeprobin
    Author

    @ErikEJ Thanks.

    I saw this is a duplicate.

    /cc @Wraith2

  6. Wraith2 commented on May 3, 2022

    @Wraith2
    Contributor

    I don't even remember opening the other one, and as you'll see the 4.0.0 milestone came and went with it untouched. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions