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

CSE0003 is raised on methods which have conditional compilation #34

Open
rmaclean opened this issue Sep 1, 2015 · 1 comment
Open
Labels
Milestone

Comments

@rmaclean
Copy link

rmaclean commented Sep 1, 2015

In the following code the CSE0003 warning is raised, implying it should be an expression bodied member when it cannot be because it isn't a single line. Worse is the suggested fix removes code.

private static string DeviceID()
{
#if WINDOWS_PHONE_APP
    var token = Windows.System.Profile.HardwareIdentification.GetPackageSpecificToken(null);
    var hardwareId = token.Id;
    var dataReader = DataReader.FromBuffer(hardwareId);

    byte[] bytes = new byte[hardwareId.Length];
    dataReader.ReadBytes(bytes);

    return BitConverter.ToString(bytes);
#endif
#if WINDOWS_UWP
    return " arrgggh Windows 10";
#endif

}
@DustinCampbell
Copy link
Owner

Great bug -- thanks!

@DustinCampbell DustinCampbell added this to the 1.0.4 milestone Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants