diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-11-03 07:30:06 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-11-03 07:30:06 -0800 |
commit | f1794fc8779ae39ac3d5bc6e8b811523e62ca482 (patch) | |
tree | 47fc2cc84483e4864c016542938937c172b22cca /src/DotNetOAuth/Util.cs | |
parent | 8cc2fa50f05f4b3cc30856b40336e9fd8ee85e33 (diff) | |
download | DotNetOpenAuth-f1794fc8779ae39ac3d5bc6e8b811523e62ca482.zip DotNetOpenAuth-f1794fc8779ae39ac3d5bc6e8b811523e62ca482.tar.gz DotNetOpenAuth-f1794fc8779ae39ac3d5bc6e8b811523e62ca482.tar.bz2 |
Moved the Google Consumer app-specific class into a new "sample" project.
Diffstat (limited to 'src/DotNetOAuth/Util.cs')
-rw-r--r-- | src/DotNetOAuth/Util.cs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/DotNetOAuth/Util.cs b/src/DotNetOAuth/Util.cs index 4a1cab9..27d8299 100644 --- a/src/DotNetOAuth/Util.cs +++ b/src/DotNetOAuth/Util.cs @@ -26,22 +26,5 @@ namespace DotNetOAuth { return string.Format(CultureInfo.InvariantCulture, "{0} ({1})", assemblyFullName, official ? "official" : "private");
}
}
-
- /// <summary>
- /// Enumerates through the individual set bits in a flag enum.
- /// </summary>
- /// <param name="flags">The flags enum value.</param>
- /// <returns>An enumeration of just the <i>set</i> bits in the flags enum.</returns>
- internal static IEnumerable<long> GetIndividualFlags(Enum flags) {
- long flagsLong = Convert.ToInt64(flags);
- for (int i = 0; i < sizeof(long) * 8; i++) { // long is the type behind the largest enum
- // Select an individual application from the scopes.
- long individualFlagPosition = (long)Math.Pow(2, i);
- long individualFlag = flagsLong & individualFlagPosition;
- if (individualFlag == individualFlagPosition) {
- yield return individualFlag;
- }
- }
- }
}
}
|