Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH502: Refactored ICakeEnvironment #1008

Closed
wants to merge 1 commit into from
Closed

GH502: Refactored ICakeEnvironment #1008

wants to merge 1 commit into from

Conversation

patriksvensson
Copy link
Member

@patriksvensson patriksvensson commented Jun 24, 2016

This included obsoleting a lot of members and also
introducing two concepts, ICakePlatform and ICakeRuntime.

ICakePlatform is an abstraction around the actual platform
that Cake is running on. This will give you information about
things such the platform family and architecture.

public interface ICakePlatform
{
    PlatformFamily Family { get; }
    bool Is64Bit { get; }
}
public enum PlatformFamily
{
    Unknown = 0,
    Windows = 1,
    Linux = 2,
    OSX = 3
}

ICakeRuntime is an abstraction around the runtime that Cake
is running in such as the .NET target platform.

public interface ICakeRuntime
{
    FrameworkName TargetFramework { get; }
}

Closes #502

@dnfclas
Copy link

dnfclas commented Jun 24, 2016

Hi @patriksvensson, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@patriksvensson patriksvensson changed the title [WIP] GH502: Added platform and runtime abstractions to ICakeEnvironment. [WIP] GH502: Refactored ICakeEnvironment Jun 24, 2016
/// Determines whether the current machine is running Unix.
/// </summary>
/// <returns>Whether or not the current machine is running Unix.</returns>
[Obsolete("Please use ICakeEnvironment.Platform.IsPosix instead.")]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong name of method.

@patriksvensson
Copy link
Member Author

patriksvensson commented Jun 24, 2016

Should we add an extension method to ICakeEnvironment called IsUnix for convenience and backwards compatability? Not sure how we going to solve it since the current method on ICakeEnvironment needs to be obsoleted (?).

This included obsoleting a lot of members and also
introducing two concepts, ICakePlatform and ICakeRuntime.

ICakePlatform is an abstraction around the actual platform
that Cake is running on. This will give you information about
things such the operating system and architecture.

ICakeRuntime is an abstraction around the runtime that Cake
is running in such as the .NET target platform.

Closes #502
@patriksvensson patriksvensson changed the title [WIP] GH502: Refactored ICakeEnvironment GH502: Refactored ICakeEnvironment Jun 25, 2016
@patriksvensson
Copy link
Member Author

@gep13 @devlead This one is ready for review.

@devlead
Copy link
Member

devlead commented Jul 7, 2016

@patriksvensson LGTM tested on several projects. I've rebased and merged into develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor ICakeEnvironment
4 participants