Markdown Timeline Page
  • John Snow on 2020-11-02 API to provide the current system time
    There is a small difference exists between implementations, but in most cases it can be moved out. In case of Kestrel's clock which has a specific logic inside, there could be made a new interface IScopedSystemClock which will provide the scope start time as UtcNow does now. Therefore, looks like all of them could be merged into a single class/interface and put into Microsoft.Extensions.Primitives.

    2 attachments 1 commit
  • James Bond added the Feature label on 2020-11-04
  • Tony Soprano assigned this issue to Marty McFly on 2020-11-04
  • Indiana Jones on 2020-11-06
    Is Feature
    YES
    Version
    .NET 5
    Has Prototype
    NO
    Priority
    Can Wait

    Actually I do not think it is needed we already have DateTime.UtcNow. However it could be useful for those who do not know about DateTime/ DateTimeOffset.

    Also what is the reasoning for DateTimeOffset.UtcNow over just DateTime.UtcNow anyway?
  • Robin Hood on 2020-11-07
    It's impossible to mock statics in case of tests. The last but not least is that DI means that there should be no statics and ability to replace any implementation by what you want, different and incompatible patterns to be clear.
  • Rocky Balboa on 2020-11-10
    It's super important for testing. Mocking things that are non deterministic is important for testing things like timeouts.
  • 🦖 Sherlock Holmes on 2020-11-11
    We have plenty of API it would be good to mock, but is either sealed or static. Example: File. It seems it wasn't a primary design criterion way back. Should we be thinking holistically about our attitude towards mockability, rather than thinking about just this one type? It might not need to be solved through API for example this proposal. Even if we want to enable it through API design, we should have a consistent pattern so it's discoverable, useable etc. I haven't kept up with the latest in mocking/DI - do we have established patterns?
  • Jay Gatsby on 2020-11-15
    We could expose a new type, but what does this mean for the existing packages that already defined their own version of ISystemClock, like auth? Would we break them?
  • John Snow on 2020-11-02 API to provide the current system time
    There is a small difference exists between implementations, but in most cases it can be moved out. In case of Kestrel's clock which has a specific logic inside, there could be made a new interface IScopedSystemClock which will provide the scope start time as UtcNow does now. Therefore, looks like all of them could be merged into a single class/interface and put into Microsoft.Extensions.Primitives.

    2 attachments 1 commit
  • James Bond added the Feature label on 2020-11-04
  • Tony Soprano assigned this issue to Marty McFly on 2020-11-04
  • Indiana Jones on 2020-11-06
    Is Feature
    YES
    Version
    .NET 5
    Has Prototype
    NO
    Priority
    Can Wait

    Actually I do not think it is needed we already have DateTime.UtcNow. However it could be useful for those who do not know about DateTime/ DateTimeOffset.

    Also what is the reasoning for DateTimeOffset.UtcNow over just DateTime.UtcNow anyway?
  • Robin Hood on 2020-11-07
    It's impossible to mock statics in case of tests. The last but not least is that DI means that there should be no statics and ability to replace any implementation by what you want, different and incompatible patterns to be clear.
  • Rocky Balboa on 2020-11-10
    It's super important for testing. Mocking things that are non deterministic is important for testing things like timeouts.
  • 🦖 Sherlock Holmes on 2020-11-11
    We have plenty of API it would be good to mock, but is either sealed or static. Example: File. It seems it wasn't a primary design criterion way back. Should we be thinking holistically about our attitude towards mockability, rather than thinking about just this one type? It might not need to be solved through API for example this proposal. Even if we want to enable it through API design, we should have a consistent pattern so it's discoverable, useable etc. I haven't kept up with the latest in mocking/DI - do we have established patterns?
  • Jay Gatsby on 2020-11-15
    We could expose a new type, but what does this mean for the existing packages that already defined their own version of ISystemClock, like auth? Would we break them?
  • John Snow on 2020-11-02 API to provide the current system time
    There is a small difference exists between implementations, but in most cases it can be moved out. In case of Kestrel's clock which has a specific logic inside, there could be made a new interface IScopedSystemClock which will provide the scope start time as UtcNow does now. Therefore, looks like all of them could be merged into a single class/interface and put into Microsoft.Extensions.Primitives.

    2 attachments 1 commit
  • James Bond added the Feature label on 2020-11-04
  • Tony Soprano assigned this issue to Marty McFly on 2020-11-04
  • Indiana Jones on 2020-11-06
    Is Feature
    YES
    Version
    .NET 5
    Has Prototype
    NO
    Priority
    Can Wait

    Actually I do not think it is needed we already have DateTime.UtcNow. However it could be useful for those who do not know about DateTime/ DateTimeOffset.

    Also what is the reasoning for DateTimeOffset.UtcNow over just DateTime.UtcNow anyway?
  • Robin Hood on 2020-11-07
    It's impossible to mock statics in case of tests. The last but not least is that DI means that there should be no statics and ability to replace any implementation by what you want, different and incompatible patterns to be clear.
  • Rocky Balboa on 2020-11-10
    It's super important for testing. Mocking things that are non deterministic is important for testing things like timeouts.
  • 🦖 Sherlock Holmes on 2020-11-11
    We have plenty of API it would be good to mock, but is either sealed or static. Example: File. It seems it wasn't a primary design criterion way back. Should we be thinking holistically about our attitude towards mockability, rather than thinking about just this one type? It might not need to be solved through API for example this proposal. Even if we want to enable it through API design, we should have a consistent pattern so it's discoverable, useable etc. I haven't kept up with the latest in mocking/DI - do we have established patterns?
  • Jay Gatsby on 2020-11-15
    We could expose a new type, but what does this mean for the existing packages that already defined their own version of ISystemClock, like auth? Would we break them?
  • John Snow on 2020-11-02 API to provide the current system time
    There is a small difference exists between implementations, but in most cases it can be moved out. In case of Kestrel's clock which has a specific logic inside, there could be made a new interface IScopedSystemClock which will provide the scope start time as UtcNow does now. Therefore, looks like all of them could be merged into a single class/interface and put into Microsoft.Extensions.Primitives.

    2 attachments 1 commit
  • James Bond added the Feature label on 2020-11-04
  • Tony Soprano assigned this issue to Marty McFly on 2020-11-04
  • Indiana Jones on 2020-11-06
    Is Feature
    YES
    Version
    .NET 5
    Has Prototype
    NO
    Priority
    Can Wait

    Actually I do not think it is needed we already have DateTime.UtcNow. However it could be useful for those who do not know about DateTime/ DateTimeOffset.

    Also what is the reasoning for DateTimeOffset.UtcNow over just DateTime.UtcNow anyway?
  • Robin Hood on 2020-11-07
    It's impossible to mock statics in case of tests. The last but not least is that DI means that there should be no statics and ability to replace any implementation by what you want, different and incompatible patterns to be clear.
  • Rocky Balboa on 2020-11-10
    It's super important for testing. Mocking things that are non deterministic is important for testing things like timeouts.
  • 🦖 Sherlock Holmes on 2020-11-11
    We have plenty of API it would be good to mock, but is either sealed or static. Example: File. It seems it wasn't a primary design criterion way back. Should we be thinking holistically about our attitude towards mockability, rather than thinking about just this one type? It might not need to be solved through API for example this proposal. Even if we want to enable it through API design, we should have a consistent pattern so it's discoverable, useable etc. I haven't kept up with the latest in mocking/DI - do we have established patterns?
  • Jay Gatsby on 2020-11-15
    We could expose a new type, but what does this mean for the existing packages that already defined their own version of ISystemClock, like auth? Would we break them?
  • John Snow on 2020-11-02 API to provide the current system time
    There is a small difference exists between implementations, but in most cases it can be moved out. In case of Kestrel's clock which has a specific logic inside, there could be made a new interface IScopedSystemClock which will provide the scope start time as UtcNow does now. Therefore, looks like all of them could be merged into a single class/interface and put into Microsoft.Extensions.Primitives.

    2 attachments 1 commit
  • James Bond added the Feature label on 2020-11-04
  • Tony Soprano assigned this issue to Marty McFly on 2020-11-04
  • Indiana Jones on 2020-11-06
    Is Feature
    YES
    Version
    .NET 5
    Has Prototype
    NO
    Priority
    Can Wait

    Actually I do not think it is needed we already have DateTime.UtcNow. However it could be useful for those who do not know about DateTime/ DateTimeOffset.

    Also what is the reasoning for DateTimeOffset.UtcNow over just DateTime.UtcNow anyway?
  • Robin Hood on 2020-11-07
    It's impossible to mock statics in case of tests. The last but not least is that DI means that there should be no statics and ability to replace any implementation by what you want, different and incompatible patterns to be clear.
  • Rocky Balboa on 2020-11-10
    It's super important for testing. Mocking things that are non deterministic is important for testing things like timeouts.
  • 🦖 Sherlock Holmes on 2020-11-11
    We have plenty of API it would be good to mock, but is either sealed or static. Example: File. It seems it wasn't a primary design criterion way back. Should we be thinking holistically about our attitude towards mockability, rather than thinking about just this one type? It might not need to be solved through API for example this proposal. Even if we want to enable it through API design, we should have a consistent pattern so it's discoverable, useable etc. I haven't kept up with the latest in mocking/DI - do we have established patterns?
  • Jay Gatsby on 2020-11-15
    We could expose a new type, but what does this mean for the existing packages that already defined their own version of ISystemClock, like auth? Would we break them?