Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/rx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Rx/NET/Source/System.Reactive.Interfaces')
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/AssemblyFileVersionAttribute.cs22
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/DateTimeOffset.cs805
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/GlobalSuppressions.cs17
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/IObservable.cs21
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/IObserver.cs33
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/NamespaceDocs.cs63
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Properties/AssemblyInfo.cs39
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduledItem.cs21
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduler.cs44
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerLongRunning.cs26
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs23
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatch.cs17
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatchProvider.cs25
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Disposables/ICancelable.cs15
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPattern.cs37
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPatternSource.cs19
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventSource.cs25
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/IObserver.Result.cs42
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IGroupedObservable.cs27
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservable.cs46
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservableProvider.cs23
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/IConnectableObservable.cs24
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.Multi.cs23
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.cs12
-rw-r--r--Rx/NET/Source/System.Reactive.Interfaces/System.Reactive.Interfaces.csproj60
25 files changed, 1509 insertions, 0 deletions
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/AssemblyFileVersionAttribute.cs b/Rx/NET/Source/System.Reactive.Interfaces/AssemblyFileVersionAttribute.cs
new file mode 100644
index 0000000..a12fbdf
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/AssemblyFileVersionAttribute.cs
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if NO_ASSEMBLYFILEVERSIONATTRIBUTE
+namespace System.Reflection
+{
+ [AttributeUsage(AttributeTargets.Assembly)]
+ public class AssemblyFileVersionAttribute : Attribute
+ {
+ private readonly string _version;
+
+ public AssemblyFileVersionAttribute(string version)
+ {
+ _version = version;
+ }
+
+ public string Version
+ {
+ get { return _version; }
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/DateTimeOffset.cs b/Rx/NET/Source/System.Reactive.Interfaces/DateTimeOffset.cs
new file mode 100644
index 0000000..5667709
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/DateTimeOffset.cs
@@ -0,0 +1,805 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if NO_DATETIMEOFFSET
+
+/*BDS+*/
+/*
+ * Copied from Dev11 source tree. Markers used to indicate changes.
+ * Search for BDS- and BDS+ to find additions and removals of code.
+ */
+/*BDS+*/
+
+// ==++==
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+//
+// ==--==
+namespace System {
+
+ using System;
+ using System.Threading;
+ using System.Globalization;
+ using System.Runtime.InteropServices;
+ using System.Runtime.CompilerServices;
+ using System.Runtime.Serialization;
+ using System.Security.Permissions;
+ /*BDS-*/ //using System.Diagnostics.Contracts;
+
+ // DateTimeOffset is a value type that consists of a DateTime and a time zone offset,
+ // ie. how far away the time is from GMT. The DateTime is stored whole, and the offset
+ // is stored as an Int16 internally to save space, but presented as a TimeSpan.
+ //
+ // The range is constrained so that both the represented clock time and the represented
+ // UTC time fit within the boundaries of MaxValue. This gives it the same range as DateTime
+ // for actual UTC times, and a slightly constrained range on one end when an offset is
+ // present.
+ //
+ // This class should be substitutable for date time in most cases; so most operations
+ // effectively work on the clock time. However, the underlying UTC time is what counts
+ // for the purposes of identity, sorting and subtracting two instances.
+ //
+ //
+ // There are theoretically two date times stored, the UTC and the relative local representation
+ // or the 'clock' time. It actually does not matter which is stored in m_dateTime, so it is desirable
+ // for most methods to go through the helpers UtcDateTime and ClockDateTime both to abstract this
+ // out and for internal readability.
+
+ [StructLayout(LayoutKind.Auto)]
+ [Serializable]
+ public struct DateTimeOffset : IComparable, /*BDS-*/ //IFormattable, ISerializable, IDeserializationCallback,
+ IComparable<DateTimeOffset>, IEquatable<DateTimeOffset> {
+
+ // Constants
+ internal const Int64 MaxOffset = TimeSpan.TicksPerHour * 14;
+ internal const Int64 MinOffset = -MaxOffset;
+
+ // Static Fields
+ /*BDS-*/ //public static readonly DateTimeOffset MinValue = new DateTimeOffset(DateTime.MinTicks, TimeSpan.Zero);
+ /*BDS+*/ public static readonly DateTimeOffset MinValue = new DateTimeOffset(DateTime.MinValue.Ticks, TimeSpan.Zero);
+ /*BDS-*/ //public static readonly DateTimeOffset MaxValue = new DateTimeOffset(DateTime.MaxTicks, TimeSpan.Zero);
+ /*BDS+*/ public static readonly DateTimeOffset MaxValue = new DateTimeOffset(DateTime.MaxValue.Ticks, TimeSpan.Zero);
+
+ // Instance Fields
+ private DateTime m_dateTime;
+ private Int16 m_offsetMinutes;
+
+ // Constructors
+
+ // Constructs a DateTimeOffset from a tick count and offset
+ public DateTimeOffset(long ticks, TimeSpan offset) {
+ m_offsetMinutes = ValidateOffset(offset);
+ // Let the DateTime constructor do the range checks
+ DateTime dateTime = new DateTime(ticks);
+ m_dateTime = ValidateDate(dateTime, offset);
+ }
+
+ // Constructs a DateTimeOffset from a DateTime. For UTC and Unspecified kinds, creates a
+ // UTC instance with a zero offset. For local, extracts the local offset.
+ public DateTimeOffset(DateTime dateTime) {
+ TimeSpan offset;
+ if (dateTime.Kind != DateTimeKind.Utc) {
+ // Local and Unspecified are both treated as Local
+ /*BDS-*/ //offset = TimeZoneInfo.Local.GetUtcOffset(dateTime, TimeZoneInfoOptions.NoThrowOnInvalidTime);
+ /*BDS+*/ offset = TimeZone.CurrentTimeZone.GetUtcOffset(dateTime);
+ }
+ else {
+ offset = new TimeSpan(0);
+ }
+ m_offsetMinutes = ValidateOffset(offset);
+ m_dateTime = ValidateDate(dateTime, offset);
+ }
+
+ // Constructs a DateTimeOffset from a DateTime. And an offset. Always makes the clock time
+ // consistent with the DateTime. For Utc ensures the offset is zero. For local, ensures that
+ // the offset corresponds to the local.
+ public DateTimeOffset(DateTime dateTime, TimeSpan offset) {
+ if (dateTime.Kind == DateTimeKind.Local) {
+ /*BDS-*/ //if (offset != TimeZoneInfo.Local.GetUtcOffset(dateTime, TimeZoneInfoOptions.NoThrowOnInvalidTime)) {
+ /*BDS+*/ if (offset != TimeZone.CurrentTimeZone.GetUtcOffset(dateTime)) {
+ /*BDS-*/ //throw new ArgumentException(Environment.GetResourceString("Argument_OffsetLocalMismatch"), "offset");
+ /*BDS+*/ throw new ArgumentException("OffsetLocalMismatch", "offset");
+ }
+ }
+ else if (dateTime.Kind == DateTimeKind.Utc) {
+ if (offset != TimeSpan.Zero) {
+ /*BDS-*/ //throw new ArgumentException(Environment.GetResourceString("Argument_OffsetUtcMismatch"), "offset");
+ /*BDS+*/ throw new ArgumentException("OffsetUtcMismatch", "offset");
+ }
+ }
+ m_offsetMinutes = ValidateOffset(offset);
+ m_dateTime = ValidateDate(dateTime, offset);
+ }
+
+ // Constructs a DateTimeOffset from a given year, month, day, hour,
+ // minute, second and offset.
+ public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, TimeSpan offset) {
+ m_offsetMinutes = ValidateOffset(offset);
+ m_dateTime = ValidateDate(new DateTime(year, month, day, hour, minute, second), offset);
+ }
+
+ // Constructs a DateTimeOffset from a given year, month, day, hour,
+ // minute, second, millsecond and offset
+ public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, TimeSpan offset) {
+ m_offsetMinutes = ValidateOffset(offset);
+ m_dateTime = ValidateDate(new DateTime(year, month, day, hour, minute, second, millisecond), offset);
+ }
+
+
+ // Constructs a DateTimeOffset from a given year, month, day, hour,
+ // minute, second, millsecond, Calendar and offset.
+ public DateTimeOffset(int year, int month, int day, int hour, int minute, int second, int millisecond, Calendar calendar, TimeSpan offset) {
+ m_offsetMinutes = ValidateOffset(offset);
+ m_dateTime = ValidateDate(new DateTime(year, month, day, hour, minute, second, millisecond, calendar), offset);
+ }
+
+ // Returns a DateTimeOffset representing the current date and time. The
+ // resolution of the returned value depends on the system timer. For
+ // Windows NT 3.5 and later the timer resolution is approximately 10ms,
+ // for Windows NT 3.1 it is approximately 16ms, and for Windows 95 and 98
+ // it is approximately 55ms.
+ //
+ public static DateTimeOffset Now {
+ get {
+ return new DateTimeOffset(DateTime.Now);
+ }
+ }
+
+ public static DateTimeOffset UtcNow {
+ get {
+ return new DateTimeOffset(DateTime.UtcNow);
+ }
+ }
+
+ public DateTime DateTime {
+ get {
+ return ClockDateTime;
+ }
+ }
+
+ public DateTime UtcDateTime {
+ /*BDS-*/ //[Pure]
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<DateTime>().Kind == DateTimeKind.Utc);
+ return DateTime.SpecifyKind(m_dateTime, DateTimeKind.Utc);
+ }
+ }
+
+ public DateTime LocalDateTime {
+ /*BDS-*/ //[Pure]
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<DateTime>().Kind == DateTimeKind.Local);
+ return UtcDateTime.ToLocalTime();
+ }
+ }
+
+ // Adjust to a given offset with the same UTC time. Can throw ArgumentException
+ //
+ public DateTimeOffset ToOffset(TimeSpan offset) {
+ return new DateTimeOffset((m_dateTime + offset).Ticks, offset);
+ }
+
+
+ // Instance Properties
+
+ // The clock or visible time represented. This is just a wrapper around the internal date because this is
+ // the chosen storage mechanism. Going through this helper is good for readability and maintainability.
+ // This should be used for display but not identity.
+ private DateTime ClockDateTime {
+ get {
+ return new DateTime((m_dateTime + Offset).Ticks, DateTimeKind.Unspecified);
+ }
+ }
+
+ // Returns the date part of this DateTimeOffset. The resulting value
+ // corresponds to this DateTimeOffset with the time-of-day part set to
+ // zero (midnight).
+ //
+ public DateTime Date {
+ get {
+ return ClockDateTime.Date;
+ }
+ }
+
+ // Returns the day-of-month part of this DateTimeOffset. The returned
+ // value is an integer between 1 and 31.
+ //
+ public int Day {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 1);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() <= 31);
+ return ClockDateTime.Day;
+ }
+ }
+
+ // Returns the day-of-week part of this DateTimeOffset. The returned value
+ // is an integer between 0 and 6, where 0 indicates Sunday, 1 indicates
+ // Monday, 2 indicates Tuesday, 3 indicates Wednesday, 4 indicates
+ // Thursday, 5 indicates Friday, and 6 indicates Saturday.
+ //
+ public DayOfWeek DayOfWeek {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<DayOfWeek>() >= DayOfWeek.Sunday);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<DayOfWeek>() <= DayOfWeek.Saturday);
+ return ClockDateTime.DayOfWeek;
+ }
+ }
+
+ // Returns the day-of-year part of this DateTimeOffset. The returned value
+ // is an integer between 1 and 366.
+ //
+ public int DayOfYear {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 1);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() <= 366); // leap year
+ return ClockDateTime.DayOfYear;
+ }
+ }
+
+ // Returns the hour part of this DateTimeOffset. The returned value is an
+ // integer between 0 and 23.
+ //
+ public int Hour {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 0);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() < 24);
+ return ClockDateTime.Hour;
+ }
+ }
+
+
+ // Returns the millisecond part of this DateTimeOffset. The returned value
+ // is an integer between 0 and 999.
+ //
+ public int Millisecond {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 0);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() < 1000);
+ return ClockDateTime.Millisecond;
+ }
+ }
+
+ // Returns the minute part of this DateTimeOffset. The returned value is
+ // an integer between 0 and 59.
+ //
+ public int Minute {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 0);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() < 60);
+ return ClockDateTime.Minute;
+ }
+ }
+
+ // Returns the month part of this DateTimeOffset. The returned value is an
+ // integer between 1 and 12.
+ //
+ public int Month {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 1);
+ return ClockDateTime.Month;
+ }
+ }
+
+ public TimeSpan Offset {
+ get {
+ return new TimeSpan(0, m_offsetMinutes, 0);
+ }
+ }
+
+ // Returns the second part of this DateTimeOffset. The returned value is
+ // an integer between 0 and 59.
+ //
+ public int Second {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 0);
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() < 60);
+ return ClockDateTime.Second;
+ }
+ }
+
+ // Returns the tick count for this DateTimeOffset. The returned value is
+ // the number of 100-nanosecond intervals that have elapsed since 1/1/0001
+ // 12:00am.
+ //
+ public long Ticks {
+ get {
+ return ClockDateTime.Ticks;
+ }
+ }
+
+ public long UtcTicks {
+ get {
+ return UtcDateTime.Ticks;
+ }
+ }
+
+ // Returns the time-of-day part of this DateTimeOffset. The returned value
+ // is a TimeSpan that indicates the time elapsed since midnight.
+ //
+ public TimeSpan TimeOfDay {
+ get {
+ return ClockDateTime.TimeOfDay;
+ }
+ }
+
+ // Returns the year part of this DateTimeOffset. The returned value is an
+ // integer between 1 and 9999.
+ //
+ public int Year {
+ get {
+ /*BDS-*/ //Contract.Ensures(Contract.Result<int>() >= 1 && Contract.Result<int>() <= 9999);
+ return ClockDateTime.Year;
+ }
+ }
+
+ // Returns the DateTimeOffset resulting from adding the given
+ // TimeSpan to this DateTimeOffset.
+ //
+ public DateTimeOffset Add(TimeSpan timeSpan) {
+ return new DateTimeOffset(ClockDateTime.Add(timeSpan), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from adding a fractional number of
+ // days to this DateTimeOffset. The result is computed by rounding the
+ // fractional number of days given by value to the nearest
+ // millisecond, and adding that interval to this DateTimeOffset. The
+ // value argument is permitted to be negative.
+ //
+ public DateTimeOffset AddDays(double days) {
+ return new DateTimeOffset(ClockDateTime.AddDays(days), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from adding a fractional number of
+ // hours to this DateTimeOffset. The result is computed by rounding the
+ // fractional number of hours given by value to the nearest
+ // millisecond, and adding that interval to this DateTimeOffset. The
+ // value argument is permitted to be negative.
+ //
+ public DateTimeOffset AddHours(double hours) {
+ return new DateTimeOffset(ClockDateTime.AddHours(hours), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from the given number of
+ // milliseconds to this DateTimeOffset. The result is computed by rounding
+ // the number of milliseconds given by value to the nearest integer,
+ // and adding that interval to this DateTimeOffset. The value
+ // argument is permitted to be negative.
+ //
+ public DateTimeOffset AddMilliseconds(double milliseconds) {
+ return new DateTimeOffset(ClockDateTime.AddMilliseconds(milliseconds), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from adding a fractional number of
+ // minutes to this DateTimeOffset. The result is computed by rounding the
+ // fractional number of minutes given by value to the nearest
+ // millisecond, and adding that interval to this DateTimeOffset. The
+ // value argument is permitted to be negative.
+ //
+ public DateTimeOffset AddMinutes(double minutes) {
+ return new DateTimeOffset(ClockDateTime.AddMinutes(minutes), Offset);
+ }
+
+ public DateTimeOffset AddMonths(int months) {
+ return new DateTimeOffset(ClockDateTime.AddMonths(months), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from adding a fractional number of
+ // seconds to this DateTimeOffset. The result is computed by rounding the
+ // fractional number of seconds given by value to the nearest
+ // millisecond, and adding that interval to this DateTimeOffset. The
+ // value argument is permitted to be negative.
+ //
+ public DateTimeOffset AddSeconds(double seconds) {
+ return new DateTimeOffset(ClockDateTime.AddSeconds(seconds), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from adding the given number of
+ // 100-nanosecond ticks to this DateTimeOffset. The value argument
+ // is permitted to be negative.
+ //
+ public DateTimeOffset AddTicks(long ticks) {
+ return new DateTimeOffset(ClockDateTime.AddTicks(ticks), Offset);
+ }
+
+ // Returns the DateTimeOffset resulting from adding the given number of
+ // years to this DateTimeOffset. The result is computed by incrementing
+ // (or decrementing) the year part of this DateTimeOffset by value
+ // years. If the month and day of this DateTimeOffset is 2/29, and if the
+ // resulting year is not a leap year, the month and day of the resulting
+ // DateTimeOffset becomes 2/28. Otherwise, the month, day, and time-of-day
+ // parts of the result are the same as those of this DateTimeOffset.
+ //
+ public DateTimeOffset AddYears(int years) {
+ return new DateTimeOffset(ClockDateTime.AddYears(years), Offset);
+ }
+
+ // Compares two DateTimeOffset values, returning an integer that indicates
+ // their relationship.
+ //
+ public static int Compare(DateTimeOffset first, DateTimeOffset second) {
+ return DateTime.Compare(first.UtcDateTime, second.UtcDateTime);
+ }
+
+ // Compares this DateTimeOffset to a given object. This method provides an
+ // implementation of the IComparable interface. The object
+ // argument must be another DateTimeOffset, or otherwise an exception
+ // occurs. Null is considered less than any instance.
+ //
+ int IComparable.CompareTo(Object obj) {
+ if (obj == null) return 1;
+ if (!(obj is DateTimeOffset)) {
+ /*BDS-*/ //throw new ArgumentException(Environment.GetResourceString("Arg_MustBeDateTimeOffset"));
+ /*BDS+*/ throw new ArgumentException("MustBeDateTimeOffset");
+ }
+
+ DateTime objUtc = ((DateTimeOffset)obj).UtcDateTime;
+ DateTime utc = UtcDateTime;
+ if (utc > objUtc) return 1;
+ if (utc < objUtc) return -1;
+ return 0;
+ }
+
+ public int CompareTo(DateTimeOffset other) {
+ DateTime otherUtc = other.UtcDateTime;
+ DateTime utc = UtcDateTime;
+ if (utc > otherUtc) return 1;
+ if (utc < otherUtc) return -1;
+ return 0;
+ }
+
+
+ // Checks if this DateTimeOffset is equal to a given object. Returns
+ // true if the given object is a boxed DateTimeOffset and its value
+ // is equal to the value of this DateTimeOffset. Returns false
+ // otherwise.
+ //
+ public override bool Equals(Object obj) {
+ if (obj is DateTimeOffset) {
+ return UtcDateTime.Equals(((DateTimeOffset)obj).UtcDateTime);
+ }
+ return false;
+ }
+
+ public bool Equals(DateTimeOffset other) {
+ return UtcDateTime.Equals(other.UtcDateTime);
+ }
+
+ public bool EqualsExact(DateTimeOffset other) {
+ //
+ // returns true when the ClockDateTime, Kind, and Offset match
+ //
+ // currently the Kind should always be Unspecified, but there is always the possibility that a future version
+ // of DateTimeOffset overloads the Kind field
+ //
+ return (ClockDateTime == other.ClockDateTime && Offset == other.Offset && ClockDateTime.Kind == other.ClockDateTime.Kind);
+ }
+
+ // Compares two DateTimeOffset values for equality. Returns true if
+ // the two DateTimeOffset values are equal, or false if they are
+ // not equal.
+ //
+ public static bool Equals(DateTimeOffset first, DateTimeOffset second) {
+ return DateTime.Equals(first.UtcDateTime, second.UtcDateTime);
+ }
+
+ // Creates a DateTimeOffset from a Windows filetime. A Windows filetime is
+ // a long representing the date and time as the number of
+ // 100-nanosecond intervals that have elapsed since 1/1/1601 12:00am.
+ //
+ public static DateTimeOffset FromFileTime(long fileTime) {
+ return new DateTimeOffset(DateTime.FromFileTime(fileTime));
+ }
+
+
+ // ----- SECTION: private serialization instance methods ----------------*
+
+#if FEATURE_SERIALIZATION
+ void IDeserializationCallback.OnDeserialization(Object sender) {
+ try {
+ m_offsetMinutes = ValidateOffset(Offset);
+ m_dateTime = ValidateDate(ClockDateTime, Offset);
+ }
+ catch (ArgumentException e) {
+ throw new SerializationException(Environment.GetResourceString("Serialization_InvalidData"), e);
+ }
+ }
+
+
+ [System.Security.SecurityCritical] // auto-generated_required
+ void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) {
+ if (info == null) {
+ throw new ArgumentNullException("info");
+ }
+
+ Contract.EndContractBlock();
+
+ info.AddValue("DateTime", m_dateTime);
+ info.AddValue("OffsetMinutes", m_offsetMinutes);
+ }
+
+
+ DateTimeOffset(SerializationInfo info, StreamingContext context) {
+ if (info == null) {
+ throw new ArgumentNullException("info");
+ }
+
+ m_dateTime = (DateTime)info.GetValue("DateTime", typeof(DateTime));
+ m_offsetMinutes = (Int16)info.GetValue("OffsetMinutes", typeof(Int16));
+ }
+#endif
+
+ // Returns the hash code for this DateTimeOffset.
+ //
+ public override int GetHashCode() {
+ return UtcDateTime.GetHashCode();
+ }
+
+/*BDS-*/ /*
+ // Constructs a DateTimeOffset from a string. The string must specify a
+ // date and optionally a time in a culture-specific or universal format.
+ // Leading and trailing whitespace characters are allowed.
+ //
+ public static DateTimeOffset Parse(String input) {
+ TimeSpan offset;
+ DateTime dateResult = DateTimeParse.Parse(input,
+ DateTimeFormatInfo.CurrentInfo,
+ DateTimeStyles.None,
+ out offset);
+ return new DateTimeOffset(dateResult.Ticks, offset);
+ }
+
+ // Constructs a DateTimeOffset from a string. The string must specify a
+ // date and optionally a time in a culture-specific or universal format.
+ // Leading and trailing whitespace characters are allowed.
+ //
+ public static DateTimeOffset Parse(String input, IFormatProvider formatProvider) {
+ return Parse(input, formatProvider, DateTimeStyles.None);
+ }
+
+ public static DateTimeOffset Parse(String input, IFormatProvider formatProvider, DateTimeStyles styles) {
+ styles = ValidateStyles(styles, "styles");
+ TimeSpan offset;
+ DateTime dateResult = DateTimeParse.Parse(input,
+ DateTimeFormatInfo.GetInstance(formatProvider),
+ styles,
+ out offset);
+ return new DateTimeOffset(dateResult.Ticks, offset);
+ }
+
+ // Constructs a DateTimeOffset from a string. The string must specify a
+ // date and optionally a time in a culture-specific or universal format.
+ // Leading and trailing whitespace characters are allowed.
+ //
+ public static DateTimeOffset ParseExact(String input, String format, IFormatProvider formatProvider) {
+ return ParseExact(input, format, formatProvider, DateTimeStyles.None);
+ }
+
+ // Constructs a DateTimeOffset from a string. The string must specify a
+ // date and optionally a time in a culture-specific or universal format.
+ // Leading and trailing whitespace characters are allowed.
+ //
+ public static DateTimeOffset ParseExact(String input, String format, IFormatProvider formatProvider, DateTimeStyles styles) {
+ styles = ValidateStyles(styles, "styles");
+ TimeSpan offset;
+ DateTime dateResult = DateTimeParse.ParseExact(input,
+ format,
+ DateTimeFormatInfo.GetInstance(formatProvider),
+ styles,
+ out offset);
+ return new DateTimeOffset(dateResult.Ticks, offset);
+ }
+
+ public static DateTimeOffset ParseExact(String input, String[] formats, IFormatProvider formatProvider, DateTimeStyles styles) {
+ styles = ValidateStyles(styles, "styles");
+ TimeSpan offset;
+ DateTime dateResult = DateTimeParse.ParseExactMultiple(input,
+ formats,
+ DateTimeFormatInfo.GetInstance(formatProvider),
+ styles,
+ out offset);
+ return new DateTimeOffset(dateResult.Ticks, offset);
+ }
+*/ /*BDS-*/
+
+ public TimeSpan Subtract(DateTimeOffset value) {
+ return UtcDateTime.Subtract(value.UtcDateTime);
+ }
+
+ public DateTimeOffset Subtract(TimeSpan value) {
+ return new DateTimeOffset(ClockDateTime.Subtract(value), Offset);
+ }
+
+
+ public long ToFileTime() {
+ return UtcDateTime.ToFileTime();
+ }
+
+ public DateTimeOffset ToLocalTime() {
+ return new DateTimeOffset(UtcDateTime.ToLocalTime());
+ }
+
+/*BDS-*/ /*
+ public override String ToString() {
+ Contract.Ensures(Contract.Result<String>() != null);
+ return DateTimeFormat.Format(ClockDateTime, null, DateTimeFormatInfo.CurrentInfo, Offset);
+ }
+
+ public String ToString(String format) {
+ Contract.Ensures(Contract.Result<String>() != null);
+ return DateTimeFormat.Format(ClockDateTime, format, DateTimeFormatInfo.CurrentInfo, Offset);
+ }
+
+ public String ToString(IFormatProvider formatProvider) {
+ Contract.Ensures(Contract.Result<String>() != null);
+ return DateTimeFormat.Format(ClockDateTime, null, DateTimeFormatInfo.GetInstance(formatProvider), Offset);
+ }
+
+ public String ToString(String format, IFormatProvider formatProvider) {
+ Contract.Ensures(Contract.Result<String>() != null);
+ return DateTimeFormat.Format(ClockDateTime, format, DateTimeFormatInfo.GetInstance(formatProvider), Offset);
+ }
+*/ /*BDS-*/
+
+ public DateTimeOffset ToUniversalTime() {
+ return new DateTimeOffset(UtcDateTime);
+ }
+
+/*BDS-*/ /*
+ public static Boolean TryParse(String input, out DateTimeOffset result) {
+ TimeSpan offset;
+ DateTime dateResult;
+ Boolean parsed = DateTimeParse.TryParse(input,
+ DateTimeFormatInfo.CurrentInfo,
+ DateTimeStyles.None,
+ out dateResult,
+ out offset);
+ result = new DateTimeOffset(dateResult.Ticks, offset);
+ return parsed;
+ }
+
+ public static Boolean TryParse(String input, IFormatProvider formatProvider, DateTimeStyles styles, out DateTimeOffset result) {
+ styles = ValidateStyles(styles, "styles");
+ TimeSpan offset;
+ DateTime dateResult;
+ Boolean parsed = DateTimeParse.TryParse(input,
+ DateTimeFormatInfo.GetInstance(formatProvider),
+ styles,
+ out dateResult,
+ out offset);
+ result = new DateTimeOffset(dateResult.Ticks, offset);
+ return parsed;
+ }
+
+ public static Boolean TryParseExact(String input, String format, IFormatProvider formatProvider, DateTimeStyles styles,
+ out DateTimeOffset result) {
+ styles = ValidateStyles(styles, "styles");
+ TimeSpan offset;
+ DateTime dateResult;
+ Boolean parsed = DateTimeParse.TryParseExact(input,
+ format,
+ DateTimeFormatInfo.GetInstance(formatProvider),
+ styles,
+ out dateResult,
+ out offset);
+ result = new DateTimeOffset(dateResult.Ticks, offset);
+ return parsed;
+ }
+
+ public static Boolean TryParseExact(String input, String[] formats, IFormatProvider formatProvider, DateTimeStyles styles,
+ out DateTimeOffset result) {
+ styles = ValidateStyles(styles, "styles");
+ TimeSpan offset;
+ DateTime dateResult;
+ Boolean parsed = DateTimeParse.TryParseExactMultiple(input,
+ formats,
+ DateTimeFormatInfo.GetInstance(formatProvider),
+ styles,
+ out dateResult,
+ out offset);
+ result = new DateTimeOffset(dateResult.Ticks, offset);
+ return parsed;
+ }
+*/ /*BDS-*/
+
+ // Ensures the TimeSpan is valid to go in a DateTimeOffset.
+ private static Int16 ValidateOffset(TimeSpan offset) {
+ Int64 ticks = offset.Ticks;
+ if (ticks % TimeSpan.TicksPerMinute != 0) {
+ /*BDS-*/ //throw new ArgumentException(Environment.GetResourceString("Argument_OffsetPrecision"), "offset");
+ /*BDS+*/ throw new ArgumentException("OffsetPrecision", "offset");
+ }
+ if (ticks < MinOffset || ticks > MaxOffset) {
+ /*BDS-*/ //throw new ArgumentOutOfRangeException("offset", Environment.GetResourceString("Argument_OffsetOutOfRange"));
+ /*BDS+*/ throw new ArgumentOutOfRangeException("offset", "OffsetOutOfRange");
+ }
+ return (Int16)(offset.Ticks / TimeSpan.TicksPerMinute);
+ }
+
+ // Ensures that the time and offset are in range.
+ private static DateTime ValidateDate(DateTime dateTime, TimeSpan offset) {
+ // The key validation is that both the UTC and clock times fit. The clock time is validated
+ // by the DateTime constructor.
+ /*BDS-*/ //Contract.Assert(offset.Ticks >= MinOffset && offset.Ticks <= MaxOffset, "Offset not validated.");
+ // This operation cannot overflow because offset should have already been validated to be within
+ // 14 hours and the DateTime instance is more than that distance from the boundaries of Int64.
+ Int64 utcTicks = dateTime.Ticks - offset.Ticks;
+ /*BDS-*/ //if (utcTicks < DateTime.MinTicks || utcTicks > DateTime.MaxTicks) {
+ /*BDS+*/ if (utcTicks < DateTime.MinValue.Ticks || utcTicks > DateTime.MaxValue.Ticks) {
+ /*BDS-*/ //throw new ArgumentOutOfRangeException("offset", Environment.GetResourceString("Argument_UTCOutOfRange"));
+ /*BDS+*/ throw new ArgumentOutOfRangeException("offset", "UTCOutOfRange");
+ }
+ // make sure the Kind is set to Unspecified
+ //
+ return new DateTime(utcTicks, DateTimeKind.Unspecified);
+ }
+
+ private static DateTimeStyles ValidateStyles(DateTimeStyles style, String parameterName) {
+/*BDS-*/ /*
+ if ((style & DateTimeFormatInfo.InvalidDateTimeStyles) != 0) {
+ throw new ArgumentException(Environment.GetResourceString("Argument_InvalidDateTimeStyles"), parameterName);
+ }
+*/ /*BDS-*/
+ if (((style & (DateTimeStyles.AssumeLocal)) != 0) && ((style & (DateTimeStyles.AssumeUniversal)) != 0)) {
+ /*BDS-*/ //throw new ArgumentException(Environment.GetResourceString("Argument_ConflictingDateTimeStyles"), parameterName);
+ /*BDS+*/ throw new ArgumentException("ConflictingDateTimeStyles", parameterName);
+ }
+ if ((style & DateTimeStyles.NoCurrentDateDefault) != 0) {
+ /*BDS-*/ //throw new ArgumentException(Environment.GetResourceString("Argument_DateTimeOffsetInvalidDateTimeStyles"), parameterName);
+ /*BDS+*/ throw new ArgumentException("DateTimeOffsetInvalidDateTimeStyles", parameterName);
+ }
+
+ /*BDS-*/ //Contract.EndContractBlock();
+ // RoundtripKind does not make sense for DateTimeOffset; ignore this flag for backward compatability with DateTime
+ style &= ~DateTimeStyles.RoundtripKind;
+
+ // AssumeLocal is also ignored as that is what we do by default with DateTimeOffset.Parse
+ style &= ~DateTimeStyles.AssumeLocal;
+
+ return style;
+ }
+
+ // Operators
+
+ public static implicit operator DateTimeOffset (DateTime dateTime) {
+ return new DateTimeOffset(dateTime);
+ }
+
+ public static DateTimeOffset operator +(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) {
+ return new DateTimeOffset(dateTimeOffset.ClockDateTime + timeSpan, dateTimeOffset.Offset);
+ }
+
+
+ public static DateTimeOffset operator -(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) {
+ return new DateTimeOffset(dateTimeOffset.ClockDateTime - timeSpan, dateTimeOffset.Offset);
+ }
+
+ public static TimeSpan operator -(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime - right.UtcDateTime;
+ }
+
+ public static bool operator ==(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime == right.UtcDateTime;
+ }
+
+ public static bool operator !=(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime != right.UtcDateTime;
+ }
+
+ public static bool operator <(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime < right.UtcDateTime;
+ }
+
+ public static bool operator <=(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime <= right.UtcDateTime;
+ }
+
+ public static bool operator >(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime > right.UtcDateTime;
+ }
+
+ public static bool operator >=(DateTimeOffset left, DateTimeOffset right) {
+ return left.UtcDateTime >= right.UtcDateTime;
+ }
+
+ }
+}
+#endif \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/GlobalSuppressions.cs b/Rx/NET/Source/System.Reactive.Interfaces/GlobalSuppressions.cs
new file mode 100644
index 0000000..6c0ef54
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/GlobalSuppressions.cs
@@ -0,0 +1,17 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+// This file is used by Code Analysis to maintain SuppressMessage
+// attributes that are applied to this project.
+// Project-level suppressions either have no target or are given
+// a specific target and scoped to a namespace, type, member, etc.
+//
+// To add a suppression to this file, right-click the message in the
+// Error List, point to "Suppress Message(s)", and click
+// "In Project Suppression File".
+// You do not need to add suppressions to this file manually.
+
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Reactive", Justification = "By design.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Reactive.Disposables", Justification = "By design.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Reactive.Linq", Justification = "By design.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Reactive.Subjects", Justification = "By design.")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames", Justification = "Taken care of by lab build.")]
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/IObservable.cs b/Rx/NET/Source/System.Reactive.Interfaces/IObservable.cs
new file mode 100644
index 0000000..f1b62d2
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/IObservable.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if NO_RXINTERFACES
+namespace System
+{
+ /// <summary>
+ /// Represents a push-style collection.
+ /// </summary>
+#if !NO_VARIANCE
+ public interface IObservable<out T>
+#else
+ public interface IObservable<T>
+#endif
+ {
+ /// <summary>
+ /// Subscribes an observer to the observable sequence.
+ /// </summary>
+ IDisposable Subscribe(IObserver<T> observer);
+ }
+}
+#endif \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/IObserver.cs b/Rx/NET/Source/System.Reactive.Interfaces/IObserver.cs
new file mode 100644
index 0000000..6ed6c58
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/IObserver.cs
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if NO_RXINTERFACES
+namespace System
+{
+ /// <summary>
+ /// Supports push-style iteration over an observable sequence.
+ /// </summary>
+#if !NO_VARIANCE
+ public interface IObserver<in T>
+#else
+ public interface IObserver<T>
+#endif
+ {
+ /// <summary>
+ /// Notifies the observer of a new element in the sequence.
+ /// </summary>
+ /// <param name="value">Next element in the sequence.</param>
+ void OnNext(T value);
+
+ /// <summary>
+ /// Notifies the observer that an exception has occurred.
+ /// </summary>
+ /// <param name="error">The error that has occurred.</param>
+ void OnError(Exception error);
+
+ /// <summary>
+ /// Notifies the observer of the end of the sequence.
+ /// </summary>
+ void OnCompleted();
+ }
+}
+#endif \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/NamespaceDocs.cs b/Rx/NET/Source/System.Reactive.Interfaces/NamespaceDocs.cs
new file mode 100644
index 0000000..c398bf7
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/NamespaceDocs.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive
+{
+ /// <summary>
+ /// The <b>System.Reactive</b> namespace contains interfaces and classes used throughout the Reactive Extensions library.
+ /// </summary>
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ class NamespaceDoc
+ {
+ }
+}
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// The <b>System.Reactive.Concurrency</b> namespace contains interfaces and classes that provide the scheduler infrastructure used by Reactive Extensions to construct and
+ /// process event streams. Schedulers are used to parameterize the concurrency introduced by query operators, provide means to virtualize time, to process historical data,
+ /// and to write unit tests for functionality built using Reactive Extensions constructs.
+ /// </summary>
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ class NamespaceDoc
+ {
+ }
+}
+
+namespace System.Reactive.Disposables
+{
+ /// <summary>
+ /// The <b>System.Reactive.Disposables</b> namespace contains interfaces and classes that provide a compositional set of constructs used to deal with resource and subscription
+ /// management in Reactive Extensions. Those types are used extensively within the implementation of Reactive Extensions and are useful when writing custom query operators or
+ /// schedulers.
+ /// </summary>
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ class NamespaceDoc
+ {
+ }
+}
+
+namespace System.Reactive.Linq
+{
+ /// <summary>
+ /// The <b>System.Reactive.Linq</b> namespace contains interfaces and classes that support expressing queries over observable sequences, using Language Integrated Query (LINQ).
+ /// Query operators are made available as extension methods for IObservable&lt;T&gt; and IQbservable&lt;T&gt; defined on the Observable and Qbservable classes, respectively.
+ /// </summary>
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ class NamespaceDoc
+ {
+ }
+}
+
+namespace System.Reactive.Subjects
+{
+ /// <summary>
+ /// The <b>System.Reactive.Subjects</b> namespace contains interfaces and classes to represent subjects, which are objects implementing both IObservable&lt;T&gt; and IObserver&lt;T&gt;.
+ /// Subjects are often used as sources of events, allowing one party to raise events and allowing another party to write queries over the event stream. Because of their ability to
+ /// have multiple registered observers, subjects are also used as a facility to provide multicast behavior for event streams in queries.
+ /// </summary>
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute]
+ class NamespaceDoc
+ {
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Properties/AssemblyInfo.cs b/Rx/NET/Source/System.Reactive.Interfaces/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..fd916fa
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Properties/AssemblyInfo.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Runtime.InteropServices;
+using System.Security;
+
+[assembly: AssemblyTitle("System.Reactive.Interfaces")]
+// Notice: same description as in the .nuspec files; see Source/Rx/Setup/NuGet
+[assembly: AssemblyDescription("Reactive Extensions Interfaces Library containing essential interfaces.")]
+#if DEBUG
+[assembly: AssemblyConfiguration("Debug")]
+#else
+[assembly: AssemblyConfiguration("Retail")]
+#endif
+[assembly: AssemblyCompany("Microsoft Open Technologies, Inc.")]
+[assembly: AssemblyProduct("Reactive Extensions")]
+[assembly: AssemblyCopyright("\x00a9 Microsoft Open Technologies, Inc. All rights reserved.")]
+[assembly: NeutralResourcesLanguage("en-US")]
+
+#if !PLIB
+[assembly: ComVisible(false)]
+#endif
+
+[assembly: CLSCompliant(true)]
+
+#if HAS_APTCA && NO_CODECOVERAGE
+[assembly: AllowPartiallyTrustedCallers]
+#endif
+
+#if XBOX_LAKEVIEW
+[assembly: SecurityTransparent]
+#endif
+
+//
+// Starting with v2.0 RC, we're bumping this file's version number,
+// because MSI wouldn't pick it up as an update otherwise...
+//
+//[assembly: AssemblyVersion("2.0.0.0")]
+//[assembly: AssemblyFileVersion("2.0.0.0")]
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduledItem.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduledItem.cs
new file mode 100644
index 0000000..ebb4879
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduledItem.cs
@@ -0,0 +1,21 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// Represents a work item that has been scheduled.
+ /// </summary>
+ /// <typeparam name="TAbsolute">Absolute time representation type.</typeparam>
+ public interface IScheduledItem<TAbsolute>
+ {
+ /// <summary>
+ /// Gets the absolute time at which the item is due for invocation.
+ /// </summary>
+ TAbsolute DueTime { get; }
+
+ /// <summary>
+ /// Invokes the work item.
+ /// </summary>
+ void Invoke();
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduler.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduler.cs
new file mode 100644
index 0000000..1c837f0
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IScheduler.cs
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// Represents an object that schedules units of work.
+ /// </summary>
+ public interface IScheduler
+ {
+ /// <summary>
+ /// Gets the scheduler's notion of current time.
+ /// </summary>
+ DateTimeOffset Now { get; }
+
+ /// <summary>
+ /// Schedules an action to be executed.
+ /// </summary>
+ /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
+ /// <param name="state">State passed to the action to be executed.</param>
+ /// <param name="action">Action to be executed.</param>
+ /// <returns>The disposable object used to cancel the scheduled action (best effort).</returns>
+ IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action);
+
+ /// <summary>
+ /// Schedules an action to be executed after dueTime.
+ /// </summary>
+ /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
+ /// <param name="state">State passed to the action to be executed.</param>
+ /// <param name="action">Action to be executed.</param>
+ /// <param name="dueTime">Relative time after which to execute the action.</param>
+ /// <returns>The disposable object used to cancel the scheduled action (best effort).</returns>
+ IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action);
+
+ /// <summary>
+ /// Schedules an action to be executed at dueTime.
+ /// </summary>
+ /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
+ /// <param name="state">State passed to the action to be executed.</param>
+ /// <param name="action">Action to be executed.</param>
+ /// <param name="dueTime">Absolute time at which to execute the action.</param>
+ /// <returns>The disposable object used to cancel the scheduled action (best effort).</returns>
+ IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action);
+ }
+} \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerLongRunning.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerLongRunning.cs
new file mode 100644
index 0000000..7d076b1
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerLongRunning.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System.Reactive.Disposables;
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// Scheduler with support for starting long-running tasks.
+ /// This type of scheduler can be used to run loops more efficiently instead of using recursive scheduling.
+ /// </summary>
+ public interface ISchedulerLongRunning
+ {
+ /// <summary>
+ /// Schedules a long-running piece of work.
+ /// </summary>
+ /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
+ /// <param name="state">State passed to the action to be executed.</param>
+ /// <param name="action">Action to be executed.</param>
+ /// <returns>The disposable object used to cancel the scheduled action (best effort).</returns>
+ /// <remarks>
+ /// <para><b>Notes to implementers</b></para>
+ /// The returned disposable object should not prevent the work from starting, but only set the cancellation flag passed to the specified action.
+ /// </remarks>
+ IDisposable ScheduleLongRunning<TState>(TState state, Action<TState, ICancelable> action);
+ }
+} \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs
new file mode 100644
index 0000000..825a748
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/ISchedulerPeriodic.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System.Reactive.Disposables;
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// Scheduler with support for running periodic tasks.
+ /// This type of scheduler can be used to run timers more efficiently instead of using recursive scheduling.
+ /// </summary>
+ public interface ISchedulerPeriodic
+ {
+ /// <summary>
+ /// Schedules a periodic piece of work.
+ /// </summary>
+ /// <typeparam name="TState">The type of the state passed to the scheduled action.</typeparam>
+ /// <param name="state">Initial state passed to the action upon the first iteration.</param>
+ /// <param name="period">Period for running the work periodically.</param>
+ /// <param name="action">Action to be executed, potentially updating the state.</param>
+ /// <returns>The disposable object used to cancel the scheduled recurring action (best effort).</returns>
+ IDisposable SchedulePeriodic<TState>(TState state, TimeSpan period, Func<TState, TState> action);
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatch.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatch.cs
new file mode 100644
index 0000000..1b482ab
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatch.cs
@@ -0,0 +1,17 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System;
+
+namespace System.Reactive.Concurrency
+{
+ /// <summary>
+ /// Abstraction for a stopwatch to compute time relative to a starting point.
+ /// </summary>
+ public interface IStopwatch
+ {
+ /// <summary>
+ /// Gets the time elapsed since the stopwatch object was obtained.
+ /// </summary>
+ TimeSpan Elapsed { get; }
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatchProvider.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatchProvider.cs
new file mode 100644
index 0000000..6a0d2a5
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Concurrency/IStopwatchProvider.cs
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+using System;
+
+namespace System.Reactive.Concurrency
+{
+ /*
+ * The ability to request a stopwatch object has been introduced in Rx v2.0 to reduce the
+ * number of allocations made by operators that use absolute time to compute relative time
+ * diffs, such as TimeInterval and Delay. This causes a large number of related objects to
+ * be allocated in the BCL, e.g. System.Globalization.DaylightTime.
+ */
+
+ /// <summary>
+ /// Provider for IStopwatch objects.
+ /// </summary>
+ public interface IStopwatchProvider
+ {
+ /// <summary>
+ /// Starts a new stopwatch object.
+ /// </summary>
+ /// <returns>New stopwatch object; started at the time of the request.</returns>
+ IStopwatch StartStopwatch();
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Disposables/ICancelable.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Disposables/ICancelable.cs
new file mode 100644
index 0000000..c361b3b
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Disposables/ICancelable.cs
@@ -0,0 +1,15 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Disposables
+{
+ /// <summary>
+ /// Disposable resource with dipsosal state tracking.
+ /// </summary>
+ public interface ICancelable : IDisposable
+ {
+ /// <summary>
+ /// Gets a value that indicates whether the object is disposed.
+ /// </summary>
+ bool IsDisposed { get; }
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPattern.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPattern.cs
new file mode 100644
index 0000000..3aab8da
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPattern.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive
+{
+ /// <summary>
+ /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event.
+ /// </summary>
+ /// <typeparam name="TSender">
+ /// The type of the sender that raised the event.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ /// <typeparam name="TEventArgs">
+ /// The type of the event data generated by the event.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ public interface IEventPattern<
+#if !NO_VARIANCE
+ out TSender, out TEventArgs
+#else
+ TSender, TEventArgs
+#endif
+ >
+#if !NO_EVENTARGS_CONSTRAINT
+ where TEventArgs : EventArgs
+#endif
+ {
+ /// <summary>
+ /// Gets the sender object that raised the event.
+ /// </summary>
+ TSender Sender { get; }
+
+ /// <summary>
+ /// Gets the event data that was generated by the event.
+ /// </summary>
+ TEventArgs EventArgs { get; }
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPatternSource.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPatternSource.cs
new file mode 100644
index 0000000..d87010d
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventPatternSource.cs
@@ -0,0 +1,19 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive
+{
+ /// <summary>
+ /// Represents a data stream signaling its elements by means of an event.
+ /// </summary>
+ /// <typeparam name="TEventArgs">The type of the event data generated by the event.</typeparam>
+ public interface IEventPatternSource<TEventArgs>
+#if !NO_EVENTARGS_CONSTRAINT
+ where TEventArgs : EventArgs
+#endif
+ {
+ /// <summary>
+ /// Event signaling the next element in the data stream.
+ /// </summary>
+ event EventHandler<TEventArgs> OnNext;
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventSource.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventSource.cs
new file mode 100644
index 0000000..1ab5135
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IEventSource.cs
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive
+{
+ /// <summary>
+ /// Represents a data stream signaling its elements by means of an event.
+ /// </summary>
+ /// <typeparam name="T">
+ /// The type of the event data generated by the event.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ public interface IEventSource<
+#if !NO_VARIANCE && !SILVERLIGHT4 // SL4 doesn't mark Action<T> as contravariant!
+ out
+#endif
+ T>
+ {
+ /// <summary>
+ /// Event signaling the next element in the data stream.
+ /// </summary>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "By design.")]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly", Justification = "Can't do this for Action<T>.")]
+ event Action<T> OnNext;
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IObserver.Result.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IObserver.Result.cs
new file mode 100644
index 0000000..8a4307d
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/IObserver.Result.cs
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive
+{
+ /// <summary>
+ /// Provides a mechanism for receiving push-based notifications and returning a response.
+ /// </summary>
+ /// <typeparam name="TValue">
+ /// The type of the elements received by the observer.
+ /// This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ /// <typeparam name="TResult">
+ /// The type of the result returned from the observer's notification handlers.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+#if !NO_VARIANCE
+ public interface IObserver<in TValue, out TResult>
+#else
+ public interface IObserver<TValue, TResult>
+#endif
+ {
+ /// <summary>
+ /// Notifies the observer of a new element in the sequence.
+ /// </summary>
+ /// <param name="value">The new element in the sequence.</param>
+ /// <returns>Result returned upon observation of a new element.</returns>
+ TResult OnNext(TValue value);
+
+ /// <summary>
+ /// Notifies the observer that an exception has occurred.
+ /// </summary>
+ /// <param name="exception">The exception that occurred.</param>
+ /// <returns>Result returned upon observation of an error.</returns>
+ TResult OnError(Exception exception);
+
+ /// <summary>
+ /// Notifies the observer of the end of the sequence.
+ /// </summary>
+ /// <returns>Result returned upon observation of the sequence completion.</returns>
+ TResult OnCompleted();
+ }
+} \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IGroupedObservable.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IGroupedObservable.cs
new file mode 100644
index 0000000..050cf2a
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IGroupedObservable.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Linq
+{
+ /// <summary>
+ /// Represents an observable sequence of elements that have a common key.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the key shared by all elements in the group.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ /// <typeparam name="TElement">
+ /// The type of the elements in the group.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+#if !NO_VARIANCE
+ public interface IGroupedObservable<out TKey, out TElement> : IObservable<TElement>
+#else
+ public interface IGroupedObservable<TKey, TElement> : IObservable<TElement>
+#endif
+ {
+ /// <summary>
+ /// Gets the common key.
+ /// </summary>
+ TKey Key { get; }
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservable.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservable.cs
new file mode 100644
index 0000000..3d0b610
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservable.cs
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if !NO_EXPRESSIONS
+using System.Linq.Expressions;
+
+namespace System.Reactive.Linq
+{
+ /// <summary>
+ /// Provides functionality to evaluate queries against a specific data source wherein the type of the data is known.
+ /// </summary>
+ /// <typeparam name="T">
+ /// The type of the data in the data source.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Qbservable", Justification = "What a pleasure to write 'by design' here.")]
+ public interface IQbservable<
+#if !NO_VARIANCE
+ out
+#endif
+ T> : IQbservable, IObservable<T>
+ {
+ }
+
+ /// <summary>
+ /// Provides functionality to evaluate queries against a specific data source wherein the type of the data is not specified.
+ /// </summary>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Qbservable", Justification = "What a pleasure to write 'by design' here.")]
+ public interface IQbservable
+ {
+ /// <summary>
+ /// Gets the type of the element(s) that are returned when the expression tree associated with this instance of IQbservable is executed.
+ /// </summary>
+ Type ElementType { get; }
+
+ /// <summary>
+ /// Gets the expression tree that is associated with the instance of IQbservable.
+ /// </summary>
+ Expression Expression { get; }
+
+ /// <summary>
+ /// Gets the query provider that is associated with this data source.
+ /// </summary>
+ IQbservableProvider Provider { get; }
+ }
+}
+#endif \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservableProvider.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservableProvider.cs
new file mode 100644
index 0000000..767a6a4
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Linq/IQbservableProvider.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+#if !NO_EXPRESSIONS
+using System.Linq.Expressions;
+
+namespace System.Reactive.Linq
+{
+ /// <summary>
+ /// Defines methods to create and execute queries that are described by an IQbservable object.
+ /// </summary>
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Qbservable", Justification = "What a pleasure to write 'by design' here.")]
+ public interface IQbservableProvider
+ {
+ /// <summary>
+ /// Constructs an IQbservable&gt;TResult&lt; object that can evaluate the query represented by a specified expression tree.
+ /// </summary>
+ /// <typeparam name="TResult">The type of the elements of the System.Reactive.Linq.IQbservable&lt;T&gt; that is returned.</typeparam>
+ /// <param name="expression">Expression tree representing the query.</param>
+ /// <returns>IQbservable object that can evaluate the given query expression.</returns>
+ IQbservable<TResult> CreateQuery<TResult>(Expression expression);
+ }
+}
+#endif \ No newline at end of file
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/IConnectableObservable.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/IConnectableObservable.cs
new file mode 100644
index 0000000..649e541
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/IConnectableObservable.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Subjects
+{
+ /// <summary>
+ /// Represents an observable wrapper that can be connected and disconnected from its underlying observable sequence.
+ /// </summary>
+ /// <typeparam name="T">
+ /// The type of the elements in the sequence.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+#if !NO_VARIANCE
+ public interface IConnectableObservable<out T> : IObservable<T>
+#else
+ public interface IConnectableObservable<T> : IObservable<T>
+#endif
+ {
+ /// <summary>
+ /// Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established.
+ /// </summary>
+ /// <returns>Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence.</returns>
+ IDisposable Connect();
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.Multi.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.Multi.cs
new file mode 100644
index 0000000..31ce1af
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.Multi.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Subjects
+{
+ /// <summary>
+ /// Represents an object that is both an observable sequence as well as an observer.
+ /// </summary>
+ /// <typeparam name="TSource">
+ /// The type of the elements received by the subject.
+ /// This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+ /// <typeparam name="TResult">
+ /// The type of the elements produced by the subject.
+ /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
+ /// </typeparam>
+#if !NO_VARIANCE
+ public interface ISubject<in TSource, out TResult> : IObserver<TSource>, IObservable<TResult>
+#else
+ public interface ISubject<TSource, TResult> : IObserver<TSource>, IObservable<TResult>
+#endif
+ {
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.cs b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.cs
new file mode 100644
index 0000000..2c92b9d
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/Reactive/Subjects/ISubject.cs
@@ -0,0 +1,12 @@
+// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
+
+namespace System.Reactive.Subjects
+{
+ /// <summary>
+ /// Represents an object that is both an observable sequence as well as an observer.
+ /// </summary>
+ /// <typeparam name="T">The type of the elements processed by the subject.</typeparam>
+ public interface ISubject<T> : ISubject<T, T>
+ {
+ }
+}
diff --git a/Rx/NET/Source/System.Reactive.Interfaces/System.Reactive.Interfaces.csproj b/Rx/NET/Source/System.Reactive.Interfaces/System.Reactive.Interfaces.csproj
new file mode 100644
index 0000000..02851a7
--- /dev/null
+++ b/Rx/NET/Source/System.Reactive.Interfaces/System.Reactive.Interfaces.csproj
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9E9B9C60-98B0-40FA-9C2B-1218D417CAA4}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>System.Reactive</RootNamespace>
+ <AssemblyName>System.Reactive.Interfaces</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProductSignAssembly>true</ProductSignAssembly>
+ <CodeAnalysisRuleSet>..\Rx.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseXBLV|AnyCPU'">
+ <OutputPath>bin\ReleaseXBLV\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DebugXBLV|AnyCPU'">
+ <OutputPath>bin\DebugXBLV\</OutputPath>
+ </PropertyGroup>
+ <Import Project="..\Common.targets" />
+ <PropertyGroup>
+ <DocumentationFile>$(OutputPath)\$(AssemblyName).XML</DocumentationFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" Condition=" '$(BuildPlatform)' == 'SILVERLIGHT' Or '$(BuildPlatform)' == 'XNA' " />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Observable" Condition=" '$(BuildFlavor)' == 'SILVERLIGHTM7' " />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyFileVersionAttribute.cs" />
+ <Compile Include="DateTimeOffset.cs" />
+ <Compile Include="GlobalSuppressions.cs" />
+ <Compile Include="IObservable.cs" />
+ <Compile Include="IObserver.cs" />
+ <Compile Include="NamespaceDocs.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Reactive\Concurrency\ISchedulerPeriodic.cs" />
+ <Compile Include="Reactive\Concurrency\IStopwatchProvider.cs" />
+ <Compile Include="Reactive\Concurrency\IScheduledItem.cs" />
+ <Compile Include="Reactive\Concurrency\IScheduler.cs" />
+ <Compile Include="Reactive\Concurrency\ISchedulerLongRunning.cs" />
+ <Compile Include="Reactive\Concurrency\IStopwatch.cs" />
+ <Compile Include="Reactive\Disposables\ICancelable.cs" />
+ <Compile Include="Reactive\IEventPattern.cs" />
+ <Compile Include="Reactive\IEventPatternSource.cs" />
+ <Compile Include="Reactive\IEventSource.cs" />
+ <Compile Include="Reactive\IObserver.Result.cs" />
+ <Compile Include="Reactive\Linq\IGroupedObservable.cs" />
+ <Compile Include="Reactive\Linq\IQbservable.cs" />
+ <Compile Include="Reactive\Linq\IQbservableProvider.cs" />
+ <Compile Include="Reactive\Subjects\IConnectableObservable.cs" />
+ <Compile Include="Reactive\Subjects\ISubject.cs" />
+ <Compile Include="Reactive\Subjects\ISubject.Multi.cs" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="..\Import.targets" />
+</Project> \ No newline at end of file