├── .gitignore
├── Core
├── CLSCompliant.cs
├── Core.csproj
├── GlobalSuppressions.cs
├── OpenSourceKey.snk
├── Properties
│ └── AssemblyInfo.cs
├── System
│ ├── Action.net30.cs
│ ├── Action10.net35.cs
│ ├── Action11.net35.cs
│ ├── Action12.net35.cs
│ ├── Action13.net35.cs
│ ├── Action14.net35.cs
│ ├── Action15.net35.cs
│ ├── Action16.net35.cs
│ ├── Action2.net30.cs
│ ├── Action3.net30.cs
│ ├── Action4.net30.cs
│ ├── Action5.net35.cs
│ ├── Action6.net35.cs
│ ├── Action7.net35.cs
│ ├── Action8.net35.cs
│ ├── Action9.net35.cs
│ ├── AggregateException.net35.cs
│ ├── Collections
│ │ ├── Concurrent
│ │ │ ├── ConcurrentDictionary.net35.cs
│ │ │ ├── ConcurrentQueue.net35.cs
│ │ │ └── IProducerConsumerCollection.net35.cs
│ │ ├── Generic
│ │ │ ├── HashSet.net30.cs
│ │ │ ├── IReadOnlyCollection.net40.cs
│ │ │ ├── IReadOnlyDictionary.net40.cs
│ │ │ ├── IReadOnlyList.net40.cs
│ │ │ ├── ISet.net35.cs
│ │ │ └── SortedSet.net35.cs
│ │ ├── IStructuralComparable.net35.cs
│ │ ├── IStructuralEquatable.net35.cs
│ │ ├── ObjectModel
│ │ │ ├── ObservableCollection.net20.cs
│ │ │ ├── ReadOnlyDictionary.KeyCollection.net40.cs
│ │ │ ├── ReadOnlyDictionary.ValueCollection.net40.cs
│ │ │ └── ReadOnlyDictionary.net40.cs
│ │ ├── Specialized
│ │ │ ├── INotifyCollectionChanged.net30.cs
│ │ │ ├── NotifyCollectionChangedAction.net30.cs
│ │ │ ├── NotifyCollectionChangedEventArgs.net30.cs
│ │ │ └── NotifyCollectionChangedEventHandler.net30.cs
│ │ └── StructuralComparisons.net35.cs
│ ├── Diagnostics
│ │ └── Contracts
│ │ │ ├── Contract.bcl.net35 .cs
│ │ │ ├── Contract.net35.cs
│ │ │ ├── ContractAbbreviatorAttribute.net40.cs
│ │ │ ├── ContractArgumentValidatorAttribute.net40.cs
│ │ │ ├── ContractClassAttribute.net35.cs
│ │ │ ├── ContractClassForAttribute.net35.cs
│ │ │ ├── ContractException.net40.cs
│ │ │ ├── ContractFailedEventArgs.net35.cs
│ │ │ ├── ContractFailureKind.net35.cs
│ │ │ ├── ContractInvariantMethodAttribute.net35.cs
│ │ │ ├── ContractOptionAttribute.net40.cs
│ │ │ ├── ContractPublicPropertyNameAttribute.net35.cs
│ │ │ ├── ContractReferenceAssemblyAttribute.net40.cs
│ │ │ ├── ContractRuntimeIgnoredAttribute.net35.cs
│ │ │ ├── ContractVerificationAttribute.net35.cs
│ │ │ ├── Internal
│ │ │ └── ContractHelper.net35.cs
│ │ │ └── PureAttribute.net35.cs
│ ├── Dynamic
│ │ └── Utils
│ │ │ ├── CacheDict.cs
│ │ │ ├── ContractsUtil.cs
│ │ │ ├── DelegateHelpers.cs
│ │ │ ├── Error.cs
│ │ │ ├── ExpressionUtils.cs
│ │ │ ├── ExpressionVisitorUtils.cs
│ │ │ ├── Helpers.cs
│ │ │ ├── ListArgumentProvider.cs
│ │ │ ├── RuntimeOps.ExpressionQuoter.cs
│ │ │ ├── RuntimeOps.RuntimeVariableList.cs
│ │ │ ├── Strings.cs
│ │ │ └── TrueReadOnlyCollection.cs
│ ├── Func1.net30.cs
│ ├── Func10.net35.cs
│ ├── Func11.net35.cs
│ ├── Func12.net35.cs
│ ├── Func13.net35.cs
│ ├── Func14.net35.cs
│ ├── Func15.net35.cs
│ ├── Func16.net35.cs
│ ├── Func17.net35.cs
│ ├── Func2.net30.cs
│ ├── Func3.net30.cs
│ ├── Func4.net30.cs
│ ├── Func5.net30.cs
│ ├── Func6.net35.cs
│ ├── Func7.net35.cs
│ ├── Func8.net35.cs
│ ├── Func9.net35.cs
│ ├── IObservable.net35.cs
│ ├── IObserver.net35.cs
│ ├── IProgress.net40.cs
│ ├── Lazy1.net35.cs
│ ├── Lazy2.net35.cs
│ ├── LazyThreadSafetyMode.net35.cs
│ ├── Linq
│ │ ├── Enumerable.groupby.net30.cs
│ │ ├── Enumerable.groupjoin.net30.cs
│ │ ├── Enumerable.join.net30.cs
│ │ ├── Enumerable.net30.cs
│ │ ├── Enumerable.numeric.net30.cs
│ │ ├── EnumerableExecutor.net35.cs
│ │ ├── EnumerableExecutor1.net35.cs
│ │ ├── EnumerableQuery.cs
│ │ ├── EnumerableQuery1.net35.cs
│ │ ├── Expressions
│ │ │ ├── BinaryExpression.net30.cs
│ │ │ ├── BlockExpression.net30.cs
│ │ │ ├── CatchBlock.net30.cs
│ │ │ ├── Compiler
│ │ │ │ ├── AnalyzedTree.net30.cs
│ │ │ │ ├── AssemblyGen.cs
│ │ │ │ ├── BoundConstants.net30.cs
│ │ │ │ ├── CompilerScope.Storage.net30.cs
│ │ │ │ ├── CompilerScope.net30.cs
│ │ │ │ ├── ConstantCheck.cs
│ │ │ │ ├── DelegateHelpers.Generated.cs
│ │ │ │ ├── DelegateHelpers.cs
│ │ │ │ ├── HoistedLocals.net30.cs
│ │ │ │ ├── ILGen.cs
│ │ │ │ ├── KeyedQueue.cs
│ │ │ │ ├── LabelInfo.cs
│ │ │ │ ├── LambdaCompiler.Address.net30.cs
│ │ │ │ ├── LambdaCompiler.Binary.net30.cs
│ │ │ │ ├── LambdaCompiler.ControlFlow.net30.cs
│ │ │ │ ├── LambdaCompiler.Expressions.net30.cs
│ │ │ │ ├── LambdaCompiler.Generated.net30.cs
│ │ │ │ ├── LambdaCompiler.Lambda.net30.cs
│ │ │ │ ├── LambdaCompiler.Logical.net30.cs
│ │ │ │ ├── LambdaCompiler.Statements.net30.cs
│ │ │ │ ├── LambdaCompiler.Unary.net30.cs
│ │ │ │ ├── LambdaCompiler.net30.cs
│ │ │ │ ├── StackSpiller.Bindings.net30.cs
│ │ │ │ ├── StackSpiller.Generated.net30.cs
│ │ │ │ ├── StackSpiller.Temps.net30.cs
│ │ │ │ ├── StackSpiller.net30.cs
│ │ │ │ └── VariableBinder.net30.cs
│ │ │ ├── ConditionalExpression.net30.cs
│ │ │ ├── ConstantExpression.net30.cs
│ │ │ ├── DebugInfoExpression.net30.cs
│ │ │ ├── DebugViewWriter.net30.cs
│ │ │ ├── DefaultExpression.net30.cs
│ │ │ ├── ElementInit.net30.cs
│ │ │ ├── Error.cs
│ │ │ ├── Expression.DebuggerProxy.net30.cs
│ │ │ ├── Expression.net30.cs
│ │ │ ├── ExpressionStringBuilder.net30.cs
│ │ │ ├── ExpressionTransformer.cs
│ │ │ ├── ExpressionType.net30.cs
│ │ │ ├── ExpressionVisitor.net30.cs
│ │ │ ├── Extensions.cs
│ │ │ ├── GotoExpression.net30.cs
│ │ │ ├── IArgumentProvider.net35.cs
│ │ │ ├── IDynamicExpression.net35.cs
│ │ │ ├── IndexExpression.net30.cs
│ │ │ ├── Interpreter
│ │ │ │ ├── AddInstruction.net30.cs
│ │ │ │ ├── ArrayOperations.net30.cs
│ │ │ │ ├── BranchLabel.net30.cs
│ │ │ │ ├── CallInstruction.Generated.net30.cs
│ │ │ │ ├── CallInstruction.net30.cs
│ │ │ │ ├── ConstantCheck.cs
│ │ │ │ ├── ControlFlowInstructions.net30.cs
│ │ │ │ ├── DivInstruction.net30.cs
│ │ │ │ ├── EqualInstruction.net30.cs
│ │ │ │ ├── FieldOperations.net30.cs
│ │ │ │ ├── GreaterThanInstruction.net30.cs
│ │ │ │ ├── ILightCallSiteBinder.cs
│ │ │ │ ├── Instruction.net30.cs
│ │ │ │ ├── InstructionList.net30.cs
│ │ │ │ ├── InterpretedFrame.net30.cs
│ │ │ │ ├── Interpreter.net30.cs
│ │ │ │ ├── LabelInfo.net30.cs
│ │ │ │ ├── LessThanInstruction.net30.cs
│ │ │ │ ├── LightCompiler.net30.cs
│ │ │ │ ├── LightDelegateCreator.net30.cs
│ │ │ │ ├── LightLambda.Generated.net30.cs
│ │ │ │ ├── LightLambda.net30.cs
│ │ │ │ ├── LocalAccess.net30.cs
│ │ │ │ ├── LocalVariables.net30.cs
│ │ │ │ ├── MulInstruction.net30.cs
│ │ │ │ ├── NotEqualInstruction.net30.cs
│ │ │ │ ├── NumericConvertInstruction.net30.cs
│ │ │ │ ├── RuntimeVariables.cs
│ │ │ │ ├── StackOperations.net30.cs
│ │ │ │ ├── SubInstruction.net30.cs
│ │ │ │ ├── TypeOperations.net30.cs
│ │ │ │ └── Utilities.net30.cs
│ │ │ ├── InvocationExpression.net30.cs
│ │ │ ├── LabelExpression.net30.cs
│ │ │ ├── LabelTarget.net35.cs
│ │ │ ├── LambdaExpression.net30.cs
│ │ │ ├── ListInitExpression.net30.cs
│ │ │ ├── LoopExpression.net30.cs
│ │ │ ├── MemberAssignment.net30.cs
│ │ │ ├── MemberBinding.net30.cs
│ │ │ ├── MemberExpression.net30.cs
│ │ │ ├── MemberInitExpression.net30.cs
│ │ │ ├── MemberListBinding.net30.cs
│ │ │ ├── MemberMemberBinding.net30.cs
│ │ │ ├── MethodCallExpression.net30.cs
│ │ │ ├── NewArrayExpression.net30.cs
│ │ │ ├── NewExpression.net30.cs
│ │ │ ├── ParameterExpression.net30.cs
│ │ │ ├── RuntimeVariablesExpression.net30.cs
│ │ │ ├── Set.net30.cs
│ │ │ ├── Strings.cs
│ │ │ ├── SwitchCase.net30.cs
│ │ │ ├── SwitchExpression.net30.cs
│ │ │ ├── SymbolDocumentInfo.net35.cs
│ │ │ ├── TryExpression.net30.cs
│ │ │ ├── TypeBinaryExpression.net30.cs
│ │ │ └── UnaryExpression.net30.cs
│ │ ├── IGrouping.net30.cs
│ │ ├── ILookup.net30.cs
│ │ ├── IOrderedEnumerable.net30.cs
│ │ ├── IOrderedQueryable.cs
│ │ ├── IOrderedQueryable1.net30.cs
│ │ ├── IQueryProvider.net30.cs
│ │ ├── IQueryable.net30.cs
│ │ ├── IQueryable1.net30.cs
│ │ ├── LinqCheck.cs
│ │ ├── Lookup.net30.cs
│ │ ├── OrderedEnumerable.cs
│ │ ├── OrderedSequence.cs
│ │ ├── ParallelExecutionMode.net35.cs
│ │ ├── ParallelMergeOptions.net35.cs
│ │ ├── Queryable.net30.cs
│ │ ├── QueryableEnumerable.cs
│ │ ├── QueryableTransformer.cs
│ │ ├── QuickSort.cs
│ │ ├── SortContext.cs
│ │ ├── SortDirection.cs
│ │ └── SortSequenceContext.cs
│ ├── Numerics
│ │ ├── BigInteger.net35.cs
│ │ ├── BigInteger.string.cs
│ │ ├── BigIntegerBuilder.cs
│ │ ├── BigNumberBuffer.cs
│ │ ├── Complex.net35.cs
│ │ ├── NumericsHelpers.cs
│ │ └── ReverseStringBuilder.cs
│ ├── Progress.net40.cs
│ ├── Reflection
│ │ ├── IntrospectionExtensions.net40.cs
│ │ └── RuntimeReflectionExtensions.net40.cs
│ ├── Runtime
│ │ ├── CompilerServices
│ │ │ ├── AsyncMethodBuilderAttribute.net40.cs
│ │ │ ├── AsyncMethodBuilderCore.cs
│ │ │ ├── AsyncMethodTaskCache.cs
│ │ │ ├── AsyncStateMachineAttribute.net40.cs
│ │ │ ├── AsyncTaskMethodBuilder.net40.cs
│ │ │ ├── AsyncValueTaskMethodBuilder.net40.cs
│ │ │ ├── AsyncVoidMethodBuilder.net40.cs
│ │ │ ├── CallerFilePathAttribute.net40.cs
│ │ │ ├── CallerLineNumberAttribute.net40.cs
│ │ │ ├── CallerMemberNameAttribute.net40.cs
│ │ │ ├── Closure.net35.cs
│ │ │ ├── ConditionalWeakTable.net35.cs
│ │ │ ├── ConfiguredTaskAwaitable.net40.cs
│ │ │ ├── ConfiguredValueTaskAwaitable.net40.cs
│ │ │ ├── ContractHelper.net40.cs
│ │ │ ├── ContractHelperEx.cs
│ │ │ ├── DynamicAttribute.net35.cs
│ │ │ ├── ExecutionScope.net30.cs
│ │ │ ├── ExtensionAttribute.net30.cs
│ │ │ ├── IAsyncMethodBuilder.cs
│ │ │ ├── IAsyncStateMachine.net40.cs
│ │ │ ├── ICriticalNotifyCompletion.net40.cs
│ │ │ ├── INotifyCompletion.net40.cs
│ │ │ ├── IRuntimeVariables.net35.cs
│ │ │ ├── IStrongBox.net30.cs
│ │ │ ├── IteratorStateMachineAttribute.net40.cs
│ │ │ ├── StateMachineAttribute.net40.cs
│ │ │ ├── StrongBox.net30.cs
│ │ │ ├── TaskAwaiter.net40.cs
│ │ │ ├── TupleElementNamesAttribute.net40.cs
│ │ │ ├── ValueTaskAwaiter.net40.cs
│ │ │ ├── VoidTaskResult.cs
│ │ │ └── YieldAwaitable.net40.cs
│ │ ├── ExceptionServices
│ │ │ └── ExceptionDispatchInfo.net40.cs
│ │ └── TargetedPatchingOptOutAttribute.net35.cs
│ ├── SR.cs
│ ├── Threading
│ │ ├── Barrier.net35.cs
│ │ ├── CancellationToken.net35.cs
│ │ ├── CancellationTokenRegistration.net35.cs
│ │ ├── CancellationTokenSource.net35.cs
│ │ ├── CountdownEvent.net35.cs
│ │ ├── IThreadPoolWorkItem.cs
│ │ ├── LazyInitializer.net35.cs
│ │ ├── LockRecursionException.cs
│ │ ├── LockRecursionPolicy.net30.cs
│ │ ├── ManualResetEventSlim.net35.cs
│ │ ├── ReaderWriterLockSlim.helpers.cs
│ │ ├── ReaderWriterLockSlim.net35.cs
│ │ ├── SemaphoreSlim.net35.cs
│ │ ├── SpinLock.net35.cs
│ │ ├── SpinWait.net35.cs
│ │ ├── Tasks
│ │ │ ├── AsyncCompatLibExtensions.net40.asyncbridge.cs
│ │ │ ├── AwaitTaskContinuation.cs
│ │ │ ├── ContinuationResultTaskFromResultTask.cs
│ │ │ ├── ContinuationResultTaskFromTask.cs
│ │ │ ├── ContinuationTaskFromResultTask.cs
│ │ │ ├── ContinuationTaskFromTask.cs
│ │ │ ├── IContinuationTask.cs
│ │ │ ├── ITaskCompletionAction.cs
│ │ │ ├── InternalSpecialCancelException.cs
│ │ │ ├── InternalTaskOptions.cs
│ │ │ ├── StandardTaskContinuation.cs
│ │ │ ├── SynchronizationContextAwaitTaskContinuation.cs
│ │ │ ├── Task.await.net35.cs
│ │ │ ├── Task.continuation.net35.cs
│ │ │ ├── Task.delay.net35.cs
│ │ │ ├── Task.microsoft.net35.cs
│ │ │ ├── Task.net35.cs
│ │ │ ├── Task.promise.net35.cs
│ │ │ ├── Task.run.net35.cs
│ │ │ ├── Task.wait.net35.cs
│ │ │ ├── Task.when.net35.cs
│ │ │ ├── Task.yield.net35.cs
│ │ │ ├── Task1.net35.cs
│ │ │ ├── TaskCanceledException.net35.cs
│ │ │ ├── TaskCompletionSource.net35.cs
│ │ │ ├── TaskContinuation.net35.cs
│ │ │ ├── TaskContinuationOptions.net35.cs
│ │ │ ├── TaskCreationOption.net35.cs
│ │ │ ├── TaskEx.asyncbridge.cs
│ │ │ ├── TaskEx.net35.asyncbridge.cs
│ │ │ ├── TaskExceptionHolder.net35.cs
│ │ │ ├── TaskExtensions.net35.cs
│ │ │ ├── TaskFactory.net35.cs
│ │ │ ├── TaskScheduler.microsoft.net35.cs
│ │ │ ├── TaskScheduler.net35.cs
│ │ │ ├── TaskSchedulerAwaitTaskContinuation.net35.cs
│ │ │ ├── TaskSchedulerException.net35.cs
│ │ │ ├── TaskStatus.net35.cs
│ │ │ ├── ThreadPoolTaskScheduler.net35.cs
│ │ │ ├── UnobservedTaskExceptionEventArgs.net35.cs
│ │ │ └── ValueTask.net40.cs
│ │ ├── ThreadLocal.net35.cs
│ │ └── Volatile.net40.cs
│ ├── Tuple.net35.cs
│ ├── Tuple1.net35.cs
│ ├── Tuple2.net35.cs
│ ├── Tuple3.net35.cs
│ ├── Tuple4.net35.cs
│ ├── Tuple5.net35.cs
│ ├── Tuple6.net35.cs
│ ├── Tuple7.net35.cs
│ ├── Tuple8.net35.cs
│ ├── TupleExtensions.net40.cs
│ ├── ValueTuple.net40.cs
│ └── WeakReference.net40.cs
├── Theraot
│ ├── Collections
│ │ ├── ConversionSet.cs
│ │ ├── ConvertedObserver.cs
│ │ ├── CustomObserver.cs
│ │ ├── EmptyCollection.cs
│ │ ├── EmptyList.cs
│ │ ├── EmptySet.cs
│ │ ├── ExtendedDictionary.cs
│ │ ├── ExtendedList.cs
│ │ ├── ExtendedQueue.cs
│ │ ├── ExtendedReadOnlyCollection.cs
│ │ ├── ExtendedReadOnlyCollection.extended.cs
│ │ ├── ExtendedReadOnlyDictionary.cs
│ │ ├── ExtendedReadOnlyList.cs
│ │ ├── ExtendedReadOnlySet.cs
│ │ ├── ExtendedSet.cs
│ │ ├── ExtendedStack.cs
│ │ ├── Extensions._.cs
│ │ ├── Extensions.add.cs
│ │ ├── Extensions.beforeafter.cs
│ │ ├── Extensions.drop.cs
│ │ ├── Extensions.extra.cs
│ │ ├── Extensions.groupby.cs
│ │ ├── Extensions.insert.cs
│ │ ├── Extensions.interleave.cs
│ │ ├── Extensions.interleave.tt
│ │ ├── Extensions.numeric.cs
│ │ ├── Extensions.operations.cs
│ │ ├── Extensions.partition.cs
│ │ ├── Extensions.zip.cs
│ │ ├── Extensions.zip.tt
│ │ ├── FilteredConvertedObserver.cs
│ │ ├── FilteredObserver.cs
│ │ ├── IDropPoint.cs
│ │ ├── IExtendedCollection.cs
│ │ ├── IExtendedDictionary.cs
│ │ ├── IExtendedList.cs
│ │ ├── IExtendedReadOnlyCollection.cs
│ │ ├── IExtendedReadOnlyDictionary.cs
│ │ ├── IExtendedReadOnlyList.cs
│ │ ├── IExtendedReadOnlySet.cs
│ │ ├── IExtendedSet.cs
│ │ ├── IProxyObservable.cs
│ │ ├── IReadOnlyDropPoint.cs
│ │ ├── IReadOnlySet.cs
│ │ ├── KeyValuePairComparer.cs
│ │ ├── KeyValuePairEqualityComparer.cs
│ │ ├── ObservableExtensions.cs
│ │ ├── ProgressiveCollection.cs
│ │ ├── ProgressiveCollection.extended.cs
│ │ ├── ProgressiveDictionary.cs
│ │ ├── ProgressiveList.cs
│ │ ├── ProgressiveList.extended.cs
│ │ ├── ProgressiveLookup.cs
│ │ ├── ProgressiveSet.cs
│ │ ├── ProgressiveSet.extended.cs
│ │ ├── Progressor.cs
│ │ ├── ProxyObservable.cs
│ │ ├── Specialized
│ │ │ ├── AVLTree.AVLNode.cs
│ │ │ ├── AVLTree.cs
│ │ │ ├── ConditionalExtendedEnumerable.cs
│ │ │ ├── ConversionComparer.cs
│ │ │ ├── ConversionEqualityComparer.cs
│ │ │ ├── ConvertedValueCollection.cs
│ │ │ ├── CustomComparer.cs
│ │ │ ├── CustomEqualityComparer.cs
│ │ │ ├── DelegatedCollection.cs
│ │ │ ├── DelegatedCollection.extended.cs
│ │ │ ├── EnumCollection.cs
│ │ │ ├── EnumerableFromDelegate.cs
│ │ │ ├── EnumerationCollection.cs
│ │ │ ├── EnumerationCollection.extended.cs
│ │ │ ├── EnumerationSet.cs
│ │ │ ├── ExtendedEnumerable.cs
│ │ │ ├── ExtendedEnumerableBase.cs
│ │ │ ├── FlagArray.cs
│ │ │ ├── Grouping.cs
│ │ │ ├── KeyCollection.cs
│ │ │ ├── NeedleConversionEqualityComparer.cs
│ │ │ ├── NullAwareDictionary.cs
│ │ │ ├── NullAwareDictionary.extended.cs
│ │ │ ├── OrderedCollection.cs
│ │ │ └── ValueCollection.cs
│ │ ├── ThreadSafe
│ │ │ ├── ArrayReservoir.cs
│ │ │ ├── Bucket.cs
│ │ │ ├── BucketCore.cs
│ │ │ ├── BucketHelper.cs
│ │ │ ├── CircularBucket.cs
│ │ │ ├── DoAction.cs
│ │ │ ├── FixedSizeBucket.cs
│ │ │ ├── FixedSizeQueue.cs
│ │ │ ├── IBucket.cs
│ │ │ ├── NeedleBucket.cs
│ │ │ ├── NeedleReservoir.cs
│ │ │ ├── Pool.cs
│ │ │ ├── ReentryGuardHelper.cs
│ │ │ ├── SafeDictionary.cs
│ │ │ ├── SafeQueue.cs
│ │ │ ├── SafeSet.cs
│ │ │ ├── WeakCancellableEvent.cs
│ │ │ ├── WeakCollection.cs
│ │ │ ├── WeakDelegateCollection.cs
│ │ │ ├── WeakDictionary.cs
│ │ │ └── WeakEvent.cs
│ │ └── TryTake.cs
│ ├── Core
│ │ ├── ActionHelper.cs
│ │ ├── ActionHelper.tt
│ │ ├── AggregateExceptionHelper.cs
│ │ ├── CancellationTokenHelper.cs
│ │ ├── CharHelper.cs
│ │ ├── Check.cs
│ │ ├── CloneHelper.cs
│ │ ├── ComparerExtensions.cs
│ │ ├── DebugHelper.cs
│ │ ├── DelegateDeepEqualityComparer.cs
│ │ ├── DelegateEqualityComparer.cs
│ │ ├── DelegateExtensions.cs
│ │ ├── EnumHelper.cs
│ │ ├── EnumerableHelper.cs
│ │ ├── EnvironmentHelper.cs
│ │ ├── EqualityComparerHelper.cs
│ │ ├── FolderEnumeration.cs
│ │ ├── FuncHelper._.cs
│ │ ├── FuncHelper.cs
│ │ ├── FuncHelper.predicate.cs
│ │ ├── FuncHelper.tt
│ │ ├── GraphHelper.cs
│ │ ├── ICloneable.cs
│ │ ├── ICloner.cs
│ │ ├── IntPtrHelper.cs
│ │ ├── MonitorHelper.cs
│ │ ├── NewEventHandler.cs
│ │ ├── NewOperationCanceledException.cs
│ │ ├── NumericHelper.Binary.cs
│ │ ├── NumericHelper.build.cs
│ │ ├── NumericHelper.checked.cs
│ │ ├── NumericHelper.checks.cs
│ │ ├── NumericHelper.cs
│ │ ├── NumericHelper.unchecked.cs
│ │ ├── OrderedEnumerable.cs
│ │ ├── PathHelper.cs
│ │ ├── PrimeHelper.array.cs
│ │ ├── PrimeHelper.cs
│ │ ├── RAMStream.cs
│ │ ├── Range.cs
│ │ ├── RangeExtensions.cs
│ │ ├── Reference.cs
│ │ ├── ReferenceEqualityComparer.cs
│ │ ├── StopwatchExtensions.cs
│ │ ├── StreamExtensions.cs
│ │ ├── StringBuilderExtensions.cs
│ │ ├── StringHelper.cs
│ │ ├── StringProcessor.cs
│ │ ├── TraceRoute.cs
│ │ ├── TracertNode.cs
│ │ ├── TupleEqualityComparer.cs
│ │ ├── TupleEqualityComparer.tt
│ │ ├── TypeHelper.ConstructorHelper.cs
│ │ ├── TypeHelper.ConstructorHelper.tt
│ │ ├── TypeHelper.cs
│ │ ├── TypeHelper.extra.cs
│ │ ├── TypeHelper.util.cs
│ │ ├── ValueActionClosure.cs
│ │ ├── ValueActionClosure.tt
│ │ ├── ValueFuncClosure.cs
│ │ └── ValueFuncClosure.tt
│ ├── Threading
│ │ ├── AtomicBoolean.cs
│ │ ├── CriticalDisposable.cs
│ │ ├── CriticalDisposable.disposable.cs
│ │ ├── Disposable.cs
│ │ ├── Disposable.disposable.cs
│ │ ├── Disposable.extended.cs
│ │ ├── DisposableAkin.cs
│ │ ├── DisposableExtensions.cs
│ │ ├── GCMonitor.cs
│ │ ├── GCMonitor.internal.cs
│ │ ├── IExtendedDisposable.cs
│ │ ├── IReadWriteLock.cs
│ │ ├── IThreadLocal.cs
│ │ ├── LockContext.cs
│ │ ├── LockSlot.cs
│ │ ├── NeedleLock.cs
│ │ ├── Needles
│ │ │ ├── CacheNeedle.cs
│ │ │ ├── DefaultNeedle.cs
│ │ │ ├── ExceptionStructNeedle.cs
│ │ │ ├── FutureAction.cs
│ │ │ ├── FutureDisposableNeedle.cs
│ │ │ ├── FutureNeedle.cs
│ │ │ ├── ICacheNeedle.cs
│ │ │ ├── INeedle.cs
│ │ │ ├── IPromise.cs
│ │ │ ├── IReadOnlyNeedle.cs
│ │ │ ├── IRecyclableNeedle.cs
│ │ │ ├── LazyAction.cs
│ │ │ ├── LazyDisposableNeedle.cs
│ │ │ ├── LazyNeedle.cs
│ │ │ ├── LockableContext.cs
│ │ │ ├── LockableNeedle.cs
│ │ │ ├── LockableSlot.cs
│ │ │ ├── Needle.cs
│ │ │ ├── NeedleHelper.cs
│ │ │ ├── NotNull.cs
│ │ │ ├── Promise.cs
│ │ │ ├── PromiseNeedle1.cs
│ │ │ ├── ReadOnlyDisposableNeedle.cs
│ │ │ ├── ReadOnlyNeedle.cs
│ │ │ ├── ReadOnlyPromise.cs
│ │ │ ├── ReadOnlyPromiseNeedle.cs
│ │ │ ├── ReadOnlyStructNeedle.cs
│ │ │ ├── StructNeedle.cs
│ │ │ ├── Transact.IResource.cs
│ │ │ ├── Transact.Needle.cs
│ │ │ ├── Transact.cs
│ │ │ ├── Transact.disposable.cs
│ │ │ ├── WeakDelegateNeedle.cs
│ │ │ ├── WeakNeedle.cs
│ │ │ ├── WeakNeedle.disposable.cs
│ │ │ └── WeakNeedle.extended.cs
│ │ ├── NoReentrantReadWriteLock.cs
│ │ ├── NoReentrantReadWriteLock.disposable.cs
│ │ ├── NoTrackingThreadLocal.cs
│ │ ├── ReadWriteLock.cs
│ │ ├── ReentrantReadWriteLock.cs
│ │ ├── ReentrantReadWriteLock.disposable.cs
│ │ ├── ReentryGuard.cs
│ │ ├── RuntimeUniqueIdProdiver.cs
│ │ ├── ThreadLocalHelper.cs
│ │ ├── ThreadingHelper.SpinWait.cs
│ │ ├── ThreadingHelper.cs
│ │ ├── ThreadingHelper.extra.cs
│ │ ├── Timeout.cs
│ │ ├── TrackingThreadLocal.cs
│ │ ├── VersionProvider.Target.cs
│ │ ├── VersionProvider.VersionToken.cs
│ │ └── VersionProvider.cs
│ └── VoidStruct.cs
└── packages.config
├── Image
└── Img.png
├── README.md
└── Unity-Serialize
├── CustomSerializer.cs
├── New
├── Attributes.cs
├── BinaryReader.cs
├── BitStream.cs
├── Interface.cs
├── Serializer.cs
└── WriterUtility.cs
├── Properties
└── AssemblyInfo.cs
├── UnityResources.cs
├── UnityResources.tt
├── Unity_Serialize.csproj
├── Utility
├── BlockExpression.cs
├── CustomSerializer.cs
├── IType.cs
└── TypeUtility.cs
└── WriterHelper
├── ArrayWriter.cs
├── BinaryWriter.cs
├── DynamicWriter.cs
├── GenericWriter.cs
├── SpecialWriter.cs
└── ValueTypeWriter.cs
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
--------------------------------------------------------------------------------
/Core/CLSCompliant.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | [assembly: CLSCompliant(true)]
--------------------------------------------------------------------------------
/Core/OpenSourceKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Difficulty-in-naming/DreamSerialize/c50f2916149a206eebbbfb3bb32f6fd2cfef3ef0/Core/OpenSourceKey.snk
--------------------------------------------------------------------------------
/Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 |
8 | #if !NETCOREAPP1_1
9 | [assembly: AssemblyCompany("Theraot")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyCopyright("Copyright 2010 - 2017 by Theraot")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 | [assembly: AssemblyFileVersion("1.0.3.0")]
16 | [assembly: AssemblyProduct("Theraot.Core")]
17 | [assembly: AssemblyTitle("Theraot.Core")]
18 | [assembly: AssemblyVersion("1.0.3.0")]
19 | #endif
20 |
21 | // Setting ComVisible to false makes the types in this assembly not visible
22 | // to COM components. If you need to access a type in this assembly from
23 | // COM, set the ComVisible attribute to true on that type.
24 | [assembly: ComVisible(false)]
25 |
26 | // The following GUID is for the ID of the typelib if this project is exposed to COM
27 | [assembly: Guid("c9c38e25-42f4-460a-a956-fd605fba20e5")]
--------------------------------------------------------------------------------
/Core/System/Action.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has no parameters and does not return a value.
6 | public delegate void Action();
7 | }
8 |
9 | #endif
--------------------------------------------------------------------------------
/Core/System/Action2.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | ///
6 | /// Encapsulates a method that has 2 parameters and does not return a value.
7 | ///
8 | /// The type of the first parameter of the method that this delegate encapsulates.
9 | /// The type of the second parameter of the method that this delegate encapsulates.
10 | /// The first parameter of the method that this delegate encapsulates.
11 | /// The second parameter of the method that this delegate encapsulates.
12 | #if NETCF
13 |
14 | public delegate void Action(T1 arg1, T2 arg2);
15 |
16 | #else
17 |
18 | public delegate void Action(T1 arg1, T2 arg2);
19 |
20 | #endif
21 | }
22 |
23 | #endif
--------------------------------------------------------------------------------
/Core/System/Action3.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | ///
6 | /// Encapsulates a method that has 3 parameters and does not return a value.
7 | ///
8 | /// The type of the first parameter of the method that this delegate encapsulates.
9 | /// The type of the second parameter of the method that this delegate encapsulates.
10 | /// The type of the third parameter of the method that this delegate encapsulates.
11 | /// The first parameter of the method that this delegate encapsulates.
12 | /// The second parameter of the method that this delegate encapsulates.
13 | /// The third parameter of the method that this delegate encapsulates.
14 | #if NETCF
15 |
16 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3);
17 |
18 | #else
19 |
20 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3);
21 |
22 | #endif
23 | }
24 |
25 | #endif
--------------------------------------------------------------------------------
/Core/System/Action4.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | ///
6 | /// Encapsulates a method that has 4 parameters and does not return a value.
7 | ///
8 | /// The type of the first parameter of the method that this delegate encapsulates.
9 | /// The type of the second parameter of the method that this delegate encapsulates.
10 | /// The type of the third parameter of the method that this delegate encapsulates.
11 | /// The type of the fourth parameter of the method that this delegate encapsulates.
12 | /// The first parameter of the method that this delegate encapsulates.
13 | /// The second parameter of the method that this delegate encapsulates.
14 | /// The third parameter of the method that this delegate encapsulates.
15 | /// The fourth parameter of the method that this delegate encapsulates.
16 | #if NETCF
17 |
18 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
19 |
20 | #else
21 |
22 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
23 |
24 | #endif
25 | }
26 |
27 | #endif
--------------------------------------------------------------------------------
/Core/System/Action5.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | ///
6 | /// Encapsulates a method that has 5 parameters and does not return a value.
7 | ///
8 | /// The type of the first parameter of the method that this delegate encapsulates.
9 | /// The type of the second parameter of the method that this delegate encapsulates.
10 | /// The type of the third parameter of the method that this delegate encapsulates.
11 | /// The type of the fourth parameter of the method that this delegate encapsulates.
12 | /// The type of the fifth parameter of the method that this delegate encapsulates.
13 | /// The first parameter of the method that this delegate encapsulates.
14 | /// The second parameter of the method that this delegate encapsulates.
15 | /// The third parameter of the method that this delegate encapsulates.
16 | /// The fourth parameter of the method that this delegate encapsulates.
17 | /// The fifth parameter of the method that this delegate encapsulates.
18 | #if NETCF
19 |
20 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
21 |
22 | #else
23 |
24 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
25 |
26 | #endif
27 | }
28 |
29 | #endif
--------------------------------------------------------------------------------
/Core/System/Action6.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | ///
6 | /// Encapsulates a method that has 6 parameters and does not return a value.
7 | ///
8 | /// The type of the first parameter of the method that this delegate encapsulates.
9 | /// The type of the second parameter of the method that this delegate encapsulates.
10 | /// The type of the third parameter of the method that this delegate encapsulates.
11 | /// The type of the fourth parameter of the method that this delegate encapsulates.
12 | /// The type of the fifth parameter of the method that this delegate encapsulates.
13 | /// The type of the sixth parameter of the method that this delegate encapsulates.
14 | /// The first parameter of the method that this delegate encapsulates.
15 | /// The second parameter of the method that this delegate encapsulates.
16 | /// The third parameter of the method that this delegate encapsulates.
17 | /// The fourth parameter of the method that this delegate encapsulates.
18 | /// The fifth parameter of the method that this delegate encapsulates.
19 | /// The sixth parameter of the method that this delegate encapsulates.
20 | #if NETCF
21 |
22 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
23 |
24 | #else
25 |
26 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
27 |
28 | #endif
29 | }
30 |
31 | #endif
--------------------------------------------------------------------------------
/Core/System/Action7.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | ///
6 | /// Encapsulates a method that has 7 parameters and does not return a value.
7 | ///
8 | /// The type of the first parameter of the method that this delegate encapsulates.
9 | /// The type of the second parameter of the method that this delegate encapsulates.
10 | /// The type of the third parameter of the method that this delegate encapsulates.
11 | /// The type of the fourth parameter of the method that this delegate encapsulates.
12 | /// The type of the fifth parameter of the method that this delegate encapsulates.
13 | /// The type of the sixth parameter of the method that this delegate encapsulates.
14 | /// The type of the seventh parameter of the method that this delegate encapsulates.
15 | /// The first parameter of the method that this delegate encapsulates.
16 | /// The second parameter of the method that this delegate encapsulates.
17 | /// The third parameter of the method that this delegate encapsulates.
18 | /// The fourth parameter of the method that this delegate encapsulates.
19 | /// The fifth parameter of the method that this delegate encapsulates.
20 | /// The sixth parameter of the method that this delegate encapsulates.
21 | /// The seventh parameter of the method that this delegate encapsulates.
22 | #if NETCF
23 |
24 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
25 |
26 | #else
27 |
28 | public delegate void Action(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7);
29 |
30 | #endif
31 | }
32 |
33 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/Concurrent/IProducerConsumerCollection.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | using System.Collections;
4 | using System.Collections.Generic;
5 |
6 | namespace Theraot.Core.System.Collections.Concurrent
7 | {
8 | public interface IProducerConsumerCollection : IEnumerable, ICollection
9 | {
10 | void CopyTo(T[] array, int index);
11 |
12 | T[] ToArray();
13 |
14 | bool TryAdd(T item);
15 |
16 | bool TryTake(out T item);
17 | }
18 | }
19 |
20 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/Generic/IReadOnlyCollection.net40.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Theraot.Core.System.Collections.Generic
4 | {
5 | #if NET40
6 |
7 | public interface IReadOnlyCollection : IEnumerable
8 | {
9 | int Count
10 | {
11 | get;
12 | }
13 | }
14 |
15 | #endif
16 | #if NET20 || NET30 || NET35
17 |
18 | public interface IReadOnlyCollection : IEnumerable
19 | {
20 | int Count { get; }
21 | }
22 |
23 | #endif
24 | }
--------------------------------------------------------------------------------
/Core/System/Collections/Generic/IReadOnlyDictionary.net40.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | #if NET20 || NET30 || NET35 || NET40
4 |
5 | namespace Theraot.Core.System.Collections.Generic
6 | {
7 | public partial interface IReadOnlyDictionary : IReadOnlyCollection>
8 | {
9 | IEnumerable Keys { get; }
10 |
11 | IEnumerable Values { get; }
12 | }
13 |
14 | public partial interface IReadOnlyDictionary
15 | {
16 | TValue this[TKey key] { get; }
17 | }
18 |
19 | public partial interface IReadOnlyDictionary
20 | {
21 | bool ContainsKey(TKey key);
22 |
23 | bool TryGetValue(TKey key, out TValue value);
24 | }
25 | }
26 |
27 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/Generic/IReadOnlyList.net40.cs:
--------------------------------------------------------------------------------
1 | namespace Theraot.Core.System.Collections.Generic
2 | {
3 | #if NET40
4 |
5 | public interface IReadOnlyList : IReadOnlyCollection
6 | {
7 | T this[int index]
8 | {
9 | get;
10 | }
11 | }
12 | #endif
13 | #if NET20 || NET30 || NET35
14 |
15 | public interface IReadOnlyList : IReadOnlyCollection
16 | {
17 | T this[int index] { get; }
18 | }
19 |
20 | #endif
21 | }
--------------------------------------------------------------------------------
/Core/System/Collections/Generic/ISet.net35.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | #if NET20 || NET30 || NET35
4 |
5 | namespace Theraot.Core.System.Collections.Generic
6 | {
7 | public interface ISet : ICollection
8 | {
9 | new bool Add(T item);
10 |
11 | void ExceptWith(IEnumerable other);
12 |
13 | void IntersectWith(IEnumerable other);
14 |
15 | bool IsProperSubsetOf(IEnumerable other);
16 |
17 | bool IsProperSupersetOf(IEnumerable other);
18 |
19 | bool IsSubsetOf(IEnumerable other);
20 |
21 | bool IsSupersetOf(IEnumerable other);
22 |
23 | bool Overlaps(IEnumerable other);
24 |
25 | bool SetEquals(IEnumerable other);
26 |
27 | void SymmetricExceptWith(IEnumerable other);
28 |
29 | void UnionWith(IEnumerable other);
30 | }
31 | }
32 |
33 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/IStructuralComparable.net35.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 |
3 | #if NET20 || NET30 || NET35
4 |
5 | namespace Theraot.Core.System.Collections
6 | {
7 | public interface IStructuralComparable
8 | {
9 | int CompareTo(object other, IComparer comparer);
10 | }
11 | }
12 |
13 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/IStructuralEquatable.net35.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 |
3 | #if NET20 || NET30 || NET35
4 |
5 | namespace Theraot.Core.System.Collections
6 | {
7 | public interface IStructuralEquatable
8 | {
9 | bool Equals(object other, IEqualityComparer comparer);
10 |
11 | int GetHashCode(IEqualityComparer comparer);
12 | }
13 | }
14 |
15 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/Specialized/INotifyCollectionChanged.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20
2 |
3 | namespace Theraot.Core.System.Collections.Specialized
4 | {
5 | public interface INotifyCollectionChanged
6 | {
7 | event NotifyCollectionChangedEventHandler CollectionChanged;
8 | }
9 | }
10 |
11 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/Specialized/NotifyCollectionChangedAction.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20
2 |
3 | namespace Theraot.Core.System.Collections.Specialized
4 | {
5 | public enum NotifyCollectionChangedAction
6 | {
7 | Add,
8 | Remove,
9 | Replace,
10 | Move,
11 | Reset
12 | }
13 | }
14 |
15 | #endif
--------------------------------------------------------------------------------
/Core/System/Collections/Specialized/NotifyCollectionChangedEventHandler.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20
2 |
3 | namespace Theraot.Core.System.Collections.Specialized
4 | {
5 | public delegate void NotifyCollectionChangedEventHandler(object sender, NotifyCollectionChangedEventArgs e);
6 | }
7 |
8 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractAbbreviatorAttribute.net40.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35 || NET40
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Enables writing abbreviations for contracts that get copied to other methods
14 | ///
15 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
16 | [Conditional("CONTRACTS_FULL")]
17 | public sealed class ContractAbbreviatorAttribute : Attribute
18 | {
19 | // Empty
20 | }
21 | }
22 |
23 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractArgumentValidatorAttribute.net40.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35 || NET40
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Enables factoring legacy if-then-throw into separate methods for reuse and full control over
14 | /// thrown exception and arguments
15 | ///
16 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
17 | [Conditional("CONTRACTS_FULL")]
18 | public sealed class ContractArgumentValidatorAttribute : Attribute
19 | {
20 | // Empty
21 | }
22 | }
23 |
24 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractClassAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Types marked with this attribute specify that a separate type contains the contracts for this type.
14 | ///
15 | [Conditional("CONTRACTS_FULL")]
16 | [Conditional("DEBUG")]
17 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
18 | public sealed class ContractClassAttribute : Attribute
19 | {
20 | private readonly Type _typeWithContracts;
21 |
22 | public ContractClassAttribute(Type typeContainingContracts)
23 | {
24 | _typeWithContracts = typeContainingContracts;
25 | }
26 |
27 | public Type TypeContainingContracts
28 | {
29 | get { return _typeWithContracts; }
30 | }
31 | }
32 | }
33 |
34 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractClassForAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Types marked with this attribute specify that they are a contract for the type that is the argument of the constructor.
14 | ///
15 | [Conditional("CONTRACTS_FULL")]
16 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
17 | public sealed class ContractClassForAttribute : Attribute
18 | {
19 | private readonly Type _typeIamAContractFor;
20 |
21 | public ContractClassForAttribute(Type typeContractsAreFor)
22 | {
23 | _typeIamAContractFor = typeContractsAreFor;
24 | }
25 |
26 | public Type TypeContractsAreFor
27 | {
28 | get { return _typeIamAContractFor; }
29 | }
30 | }
31 | }
32 |
33 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractFailureKind.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | // Licensed to the .NET Foundation under one or more agreements.
4 | // The .NET Foundation licenses this file to you under the MIT license.
5 | // See the LICENSE file in the project root for more information.
6 |
7 | namespace Theraot.Core.System.Diagnostics.Contracts
8 | {
9 | public enum ContractFailureKind
10 | {
11 | Precondition,
12 | Postcondition,
13 | PostconditionOnException,
14 | Invariant,
15 | Assert,
16 | Assume,
17 | }
18 | }
19 |
20 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractInvariantMethodAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// This attribute is used to mark a method as being the invariant
14 | /// method for a class. The method can have any name, but it must
15 | /// return "void" and take no parameters. The body of the method
16 | /// must consist solely of one or more calls to the method
17 | /// Contract.Invariant. A suggested name for the method is
18 | /// "ObjectInvariant".
19 | ///
20 | [Conditional("CONTRACTS_FULL")]
21 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
22 | public sealed class ContractInvariantMethodAttribute : Attribute
23 | {
24 | // Empty
25 | }
26 | }
27 |
28 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractOptionAttribute.net40.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35 || NET40
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Allows setting contract and tool options at assembly, type, or method granularity.
14 | ///
15 | [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
16 | [Conditional("CONTRACTS_FULL")]
17 | public sealed class ContractOptionAttribute : Attribute
18 | {
19 | private readonly string _category;
20 | private readonly string _setting;
21 | private readonly bool _enabled;
22 | private readonly string _value;
23 |
24 | public ContractOptionAttribute(string category, string setting, bool enabled)
25 | {
26 | _category = category;
27 | _setting = setting;
28 | _enabled = enabled;
29 | }
30 |
31 | public ContractOptionAttribute(string category, string setting, string value)
32 | {
33 | _category = category;
34 | _setting = setting;
35 | _value = value;
36 | }
37 |
38 | public string Category
39 | {
40 | get { return _category; }
41 | }
42 |
43 | public string Setting
44 | {
45 | get { return _setting; }
46 | }
47 |
48 | public bool Enabled
49 | {
50 | get { return _enabled; }
51 | }
52 |
53 | public string Value
54 | {
55 | get { return _value; }
56 | }
57 | }
58 | }
59 |
60 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractPublicPropertyNameAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Allows a field f to be used in the method contracts for a method m when f has less visibility than m.
14 | /// For instance, if the method is public, but the field is private.
15 | ///
16 | [Conditional("CONTRACTS_FULL")]
17 | [AttributeUsage(AttributeTargets.Field)]
18 | public sealed class ContractPublicPropertyNameAttribute : Attribute
19 | {
20 | private readonly string _publicName;
21 |
22 | public ContractPublicPropertyNameAttribute(string name)
23 | {
24 | _publicName = name;
25 | }
26 |
27 | public string Name
28 | {
29 | get { return _publicName; }
30 | }
31 | }
32 | }
33 |
34 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractReferenceAssemblyAttribute.net40.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | #if NET20 || NET30 || NET35 || NET40
4 |
5 | // Licensed to the .NET Foundation under one or more agreements.
6 | // The .NET Foundation licenses this file to you under the MIT license.
7 | // See the LICENSE file in the project root for more information.
8 |
9 | namespace Theraot.Core.System.Diagnostics.Contracts
10 | {
11 | ///
12 | /// Attribute that specifies that an assembly is a reference assembly with contracts.
13 | ///
14 | [AttributeUsage(AttributeTargets.Assembly)]
15 | public sealed class ContractReferenceAssemblyAttribute : Attribute
16 | {
17 | // Empty
18 | }
19 | }
20 |
21 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractRuntimeIgnoredAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Methods (and properties) marked with this attribute can be used within calls to Contract methods, but have no runtime behavior associated with them.
14 | ///
15 | [Conditional("CONTRACTS_FULL")]
16 | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
17 | public sealed class ContractRuntimeIgnoredAttribute : Attribute
18 | {
19 | // Empty
20 | }
21 | }
22 |
23 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/ContractVerificationAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Instructs downstream tools whether to assume the correctness of this assembly, type or member without performing any verification or not.
14 | /// Can use [ContractVerification(false)] to explicitly mark assembly, type or member as one to *not* have verification performed on it.
15 | /// Most specific element found (member, type, then assembly) takes precedence.
16 | /// (That is useful if downstream tools allow a user to decide which polarity is the default, unmarked case.)
17 | ///
18 | ///
19 | /// Apply this attribute to a type to apply to all members of the type, including nested types.
20 | /// Apply this attribute to an assembly to apply to all types and members of the assembly.
21 | /// Apply this attribute to a property to apply to both the getter and setter.
22 | ///
23 | [Conditional("CONTRACTS_FULL")]
24 | [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property)]
25 | public sealed class ContractVerificationAttribute : Attribute
26 | {
27 | private readonly bool _value;
28 |
29 | public ContractVerificationAttribute(bool value)
30 | {
31 | _value = value;
32 | }
33 |
34 | public bool Value
35 | {
36 | get { return _value; }
37 | }
38 | }
39 | }
40 |
41 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/Internal/ContractHelper.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | // Licensed to the .NET Foundation under one or more agreements.
4 | // The .NET Foundation licenses this file to you under the MIT license.
5 | // See the LICENSE file in the project root for more information.
6 |
7 | using System;
8 | using System.Diagnostics;
9 | using System.Runtime.ConstrainedExecution;
10 |
11 | // Note: In .NET FX 4.5, we duplicated the ContractHelper class in the System.Runtime.CompilerServices
12 | // namespace to remove an ugly wart of a namespace from the Windows 8 profile. But we still need the
13 | // old locations left around, so we can support rewritten .NET FX 4.0 libraries. Consider removing
14 | // these from our reference assembly in a future version.
15 | namespace Theraot.Core.System.Diagnostics.Contracts.Internal
16 | {
17 | [Obsolete("Use the ContractHelper class in the System.Runtime.CompilerServices namespace instead.")]
18 | public static class ContractHelper
19 | {
20 | [DebuggerNonUserCode]
21 | [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
22 | public static string RaiseContractFailedEvent(ContractFailureKind failureKind, string userMessage, string conditionText, Exception innerException)
23 | {
24 | return global::Theraot.Core.System.Runtime.CompilerServices.ContractHelper.RaiseContractFailedEvent(failureKind, userMessage, conditionText, innerException);
25 | }
26 |
27 | [DebuggerNonUserCode]
28 | [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
29 | public static void TriggerFailure(ContractFailureKind kind, string displayMessage, string userMessage, string conditionText, Exception innerException)
30 | {
31 | global::Theraot.Core.System.Runtime.CompilerServices.ContractHelper.TriggerFailure(kind, displayMessage, userMessage, conditionText, innerException);
32 | }
33 | }
34 | }
35 |
36 | #endif
--------------------------------------------------------------------------------
/Core/System/Diagnostics/Contracts/PureAttribute.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 |
4 | #if NET20 || NET30 || NET35
5 |
6 | // Licensed to the .NET Foundation under one or more agreements.
7 | // The .NET Foundation licenses this file to you under the MIT license.
8 | // See the LICENSE file in the project root for more information.
9 |
10 | namespace Theraot.Core.System.Diagnostics.Contracts
11 | {
12 | ///
13 | /// Methods and classes marked with this attribute can be used within calls to Contract methods. Such methods not make any visible state changes.
14 | ///
15 | [Conditional("CONTRACTS_FULL")]
16 | [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Delegate | AttributeTargets.Class | AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
17 | public sealed class PureAttribute : Attribute
18 | {
19 | // Empty
20 | }
21 | }
22 |
23 | #endif
--------------------------------------------------------------------------------
/Core/System/Dynamic/Utils/ExpressionVisitorUtils.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 |
6 | using Theraot.Core.System.Linq.Expressions;
7 |
8 | namespace Theraot.Core.System.Dynamic.Utils
9 | {
10 | internal static class ExpressionVisitorUtils
11 | {
12 | public static Expression[] VisitArguments(ExpressionVisitor visitor, IArgumentProvider nodes)
13 | {
14 | Expression[] newNodes = null;
15 | var n = nodes.ArgumentCount;
16 | for (var i = 0; i < n; i++)
17 | {
18 | var curNode = nodes.GetArgument(i);
19 | var node = visitor.Visit(curNode);
20 |
21 | if (newNodes != null)
22 | {
23 | newNodes[i] = node;
24 | }
25 | else if (!ReferenceEquals(node, curNode))
26 | {
27 | newNodes = new Expression[n];
28 | for (var j = 0; j < i; j++)
29 | {
30 | newNodes[j] = nodes.GetArgument(j);
31 | }
32 | newNodes[i] = node;
33 | }
34 | }
35 | return newNodes;
36 | }
37 | }
38 | }
39 |
40 | #endif
--------------------------------------------------------------------------------
/Core/System/Dynamic/Utils/Helpers.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Collections.Generic;
5 | using Theraot.Core.System.Collections.Generic;
6 |
7 | namespace Theraot.Core.System.Dynamic.Utils
8 | {
9 | // Miscellaneous helpers that don't belong anywhere else
10 | internal static class Helpers
11 | {
12 | internal static T CommonNode(T first, T second, Func parent) where T : class
13 | {
14 | // NOTICE this method has no null check
15 | var cmp = EqualityComparer.Default;
16 | if (cmp.Equals(first, second))
17 | {
18 | return first;
19 | }
20 | var set = new HashSet(cmp);
21 | for (var t = first; t != null; t = parent(t))
22 | {
23 | set.Add(t);
24 | }
25 | for (var t = second; t != null; t = parent(t))
26 | {
27 | if (set.Contains(t))
28 | {
29 | return t;
30 | }
31 | }
32 | return null;
33 | }
34 |
35 | internal static void IncrementCount(T key, Dictionary dict)
36 | {
37 | int count;
38 | dict.TryGetValue(key, out count);
39 | dict[key] = count + 1;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Core/System/Dynamic/Utils/TrueReadOnlyCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) Microsoft. All rights reserved.
2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 |
4 | using System.Collections.ObjectModel;
5 |
6 | namespace Theraot.Core.System.Dynamic.Utils
7 | {
8 | internal sealed class TrueReadOnlyCollection : ReadOnlyCollection
9 | {
10 | ///
11 | /// Creates instance of TrueReadOnlyCollection, wrapping passed in array.
12 | /// !!! DOES NOT COPY THE ARRAY !!!
13 | ///
14 | public TrueReadOnlyCollection(T[] list)
15 | : base(list)
16 | {
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/Core/System/Func1.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has no parameters and returns a value of the type specified by the parameter.
6 | /// The return value of the method that this delegate encapsulates.
7 | /// The type of the return value of the method that this delegate encapsulates.
8 | #if NETCF
9 |
10 | public delegate TResult Func();
11 |
12 | #else
13 |
14 | public delegate TResult Func();
15 |
16 | #endif
17 | }
18 |
19 | #endif
--------------------------------------------------------------------------------
/Core/System/Func2.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has one parameter and returns a value of the type specified by the parameter.
6 | /// The type of the parameter of the method that this delegate encapsulates.
7 | /// The type of the return value of the method that this delegate encapsulates.
8 | /// The parameter of the method that this delegate encapsulates.
9 | /// The return value of the method that this delegate encapsulates.
10 | #if NETCF
11 |
12 | public delegate TResult Func(T arg);
13 |
14 | #else
15 |
16 | public delegate TResult Func(T arg);
17 |
18 | #endif
19 | }
20 |
21 | #endif
--------------------------------------------------------------------------------
/Core/System/Func3.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has two parameters and returns a value of the type specified by the parameter.
6 | /// The type of the first parameter of the method that this delegate encapsulates.
7 | /// The type of the second parameter of the method that this delegate encapsulates.
8 | /// The type of the return value of the method that this delegate encapsulates.
9 | /// The first parameter of the method that this delegate encapsulates.
10 | /// The second parameter of the method that this delegate encapsulates.
11 | /// The return value of the method that this delegate encapsulates.
12 | #if NETCF
13 |
14 | public delegate TResult Func(T1 arg1, T2 arg2);
15 |
16 | #else
17 |
18 | public delegate TResult Func(T1 arg1, T2 arg2);
19 |
20 | #endif
21 | }
22 |
23 | #endif
--------------------------------------------------------------------------------
/Core/System/Func4.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has three parameters and returns a value of the type specified by the parameter.
6 | /// The type of the first parameter of the method that this delegate encapsulates.
7 | /// The type of the second parameter of the method that this delegate encapsulates.
8 | /// The type of the third parameter of the method that this delegate encapsulates.
9 | /// The type of the return value of the method that this delegate encapsulates.
10 | /// The first parameter of the method that this delegate encapsulates.
11 | /// The second parameter of the method that this delegate encapsulates.
12 | /// The third parameter of the method that this delegate encapsulates.
13 | /// The return value of the method that this delegate encapsulates.
14 | #if NETCF
15 |
16 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3);
17 |
18 | #else
19 |
20 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3);
21 |
22 | #endif
23 | }
24 |
25 | #endif
--------------------------------------------------------------------------------
/Core/System/Func5.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has four parameters and returns a value of the type specified by the parameter.
6 | /// The type of the first parameter of the method that this delegate encapsulates.
7 | /// The type of the second parameter of the method that this delegate encapsulates.
8 | /// The type of the third parameter of the method that this delegate encapsulates.
9 | /// The type of the fourth parameter of the method that this delegate encapsulates.
10 | /// The type of the return value of the method that this delegate encapsulates.
11 | /// The first parameter of the method that this delegate encapsulates.
12 | /// The second parameter of the method that this delegate encapsulates.
13 | /// The third parameter of the method that this delegate encapsulates.
14 | /// The fourth parameter of the method that this delegate encapsulates.
15 | /// The return value of the method that this delegate encapsulates.
16 | #if NETCF
17 |
18 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
19 |
20 | #else
21 |
22 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
23 |
24 | #endif
25 | }
26 |
27 | #endif
--------------------------------------------------------------------------------
/Core/System/Func6.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has five parameters and returns a value of the type specified by the parameter.
6 | /// The type of the first parameter of the method that this delegate encapsulates.
7 | /// The type of the second parameter of the method that this delegate encapsulates.
8 | /// The type of the third parameter of the method that this delegate encapsulates.
9 | /// The type of the fourth parameter of the method that this delegate encapsulates.
10 | /// The type of the fifth parameter of the method that this delegate encapsulates.
11 | /// The type of the return value of the method that this delegate encapsulates.
12 | /// The first parameter of the method that this delegate encapsulates.
13 | /// The second parameter of the method that this delegate encapsulates.
14 | /// The third parameter of the method that this delegate encapsulates.
15 | /// The fourth parameter of the method that this delegate encapsulates.
16 | /// The fifth parameter of the method that this delegate encapsulates.
17 | /// The return value of the method that this delegate encapsulates.
18 | #if NETCF
19 |
20 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
21 |
22 | #else
23 |
24 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5);
25 |
26 | #endif
27 | }
28 |
29 | #endif
--------------------------------------------------------------------------------
/Core/System/Func7.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | /// Encapsulates a method that has six parameters and returns a value of the type specified by the parameter.
6 | /// The type of the first parameter of the method that this delegate encapsulates.
7 | /// The type of the second parameter of the method that this delegate encapsulates.
8 | /// The type of the third parameter of the method that this delegate encapsulates.
9 | /// The type of the fourth parameter of the method that this delegate encapsulates.
10 | /// The type of the fifth parameter of the method that this delegate encapsulates.
11 | /// The type of the sixth parameter of the method that this delegate encapsulates.
12 | /// The type of the return value of the method that this delegate encapsulates.
13 | /// The first parameter of the method that this delegate encapsulates.
14 | /// The second parameter of the method that this delegate encapsulates.
15 | /// The third parameter of the method that this delegate encapsulates.
16 | /// The fourth parameter of the method that this delegate encapsulates.
17 | /// The fifth parameter of the method that this delegate encapsulates.
18 | /// The sixth parameter of the method that this delegate encapsulates.
19 | /// The return value of the method that this delegate encapsulates.
20 | #if NETCF
21 |
22 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
23 |
24 | #else
25 |
26 | public delegate TResult Func(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6);
27 |
28 | #endif
29 | }
30 |
31 | #endif
--------------------------------------------------------------------------------
/Core/System/IObservable.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | #if NET20 || NET30 || NET35
4 |
5 | namespace Theraot.Core.System
6 | {
7 | /// Defines a provider for push-based notification.
8 | /// The object that provides notification information.
9 | #if NETCF
10 |
11 | public interface IObservable
12 | #else
13 |
14 | public interface IObservable
15 | #endif
16 | {
17 | /// Notifies the provider that an observer is to receive notifications.
18 | /// A reference to an interface that allows observers to stop receiving notifications before the provider has finished sending them.
19 | /// The object that is to receive notifications.
20 | IDisposable Subscribe(IObserver observer);
21 | }
22 | }
23 |
24 | #endif
--------------------------------------------------------------------------------
/Core/System/IObserver.net35.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | #if NET20 || NET30 || NET35
4 |
5 | namespace Theraot.Core.System
6 | {
7 | /// Provides a mechanism for receiving push-based notifications.
8 | /// The object that provides notification information.
9 | #if NETCF
10 |
11 | public interface IObserver
12 | #else
13 |
14 | public interface IObserver
15 | #endif
16 | {
17 | /// Notifies the observer that the provider has finished sending push-based notifications.
18 | void OnCompleted();
19 |
20 | /// Notifies the observer that the provider has experienced an error condition.
21 | /// An object that provides additional information about the error.
22 | void OnError(Exception error);
23 |
24 | /// Provides the observer with new data.
25 | /// The current notification information.
26 | void OnNext(T value);
27 | }
28 | }
29 |
30 | #endif
--------------------------------------------------------------------------------
/Core/System/IProgress.net40.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35 ||NET40
2 |
3 | namespace Theraot.Core.System
4 | {
5 | #if NETCF
6 |
7 | public interface IProgress
8 | #else
9 |
10 | public interface IProgress
11 | #endif
12 | {
13 | void Report(T value);
14 | }
15 | }
16 |
17 | #endif
--------------------------------------------------------------------------------
/Core/System/Lazy2.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | public class Lazy : Lazy
6 | {
7 | private readonly TMetadata _metadata;
8 |
9 | public Lazy(TMetadata metadata)
10 | {
11 | _metadata = metadata;
12 | }
13 |
14 | public Lazy(Func valueFactory, TMetadata metadata)
15 | : base(valueFactory)
16 | {
17 | _metadata = metadata;
18 | }
19 |
20 | public Lazy(TMetadata metadata, bool isThreadSafe)
21 | : base(isThreadSafe)
22 | {
23 | _metadata = metadata;
24 | }
25 |
26 | public Lazy(TMetadata metadata, LazyThreadSafetyMode mode)
27 | : base(mode)
28 | {
29 | _metadata = metadata;
30 | }
31 |
32 | public Lazy(Func valueFactory, TMetadata metadata, bool isThreadSafe)
33 | : base(valueFactory, isThreadSafe)
34 | {
35 | _metadata = metadata;
36 | }
37 |
38 | public Lazy(Func valueFactory, TMetadata metadata, LazyThreadSafetyMode mode)
39 | : base(valueFactory, mode)
40 | {
41 | _metadata = metadata;
42 | }
43 |
44 | public TMetadata Metadata
45 | {
46 | get { return _metadata; }
47 | }
48 | }
49 | }
50 |
51 | #endif
--------------------------------------------------------------------------------
/Core/System/LazyThreadSafetyMode.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System
4 | {
5 | public enum LazyThreadSafetyMode
6 | {
7 | None,
8 | PublicationOnly,
9 | ExecutionAndPublication
10 | }
11 | }
12 |
13 | #endif
--------------------------------------------------------------------------------
/Core/System/Linq/EnumerableExecutor.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System.Linq
4 | {
5 | public abstract class EnumerableExecutor
6 | {
7 | //Empty
8 | }
9 | }
10 |
11 | #endif
--------------------------------------------------------------------------------
/Core/System/Linq/EnumerableExecutor1.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | namespace Theraot.Core.System.Linq
4 | {
5 | public abstract class EnumerableExecutor : EnumerableExecutor
6 | {
7 | //Empty
8 | }
9 | }
10 |
11 | #endif
--------------------------------------------------------------------------------
/Core/System/Linq/EnumerableQuery.cs:
--------------------------------------------------------------------------------
1 | namespace Theraot.Core.System.Linq
2 | {
3 | public abstract class EnumerableQuery
4 | {
5 | // Empty
6 | }
7 | }
--------------------------------------------------------------------------------
/Core/System/Linq/EnumerableQuery1.net35.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30 || NET35
2 |
3 | using System;
4 | using System.Collections;
5 | using System.Collections.Generic;
6 | using Theraot.Core.System.Linq.Expressions;
7 |
8 | namespace Theraot.Core.System.Linq
9 | {
10 | public class EnumerableQuery : EnumerableQuery, IOrderedQueryable, IQueryProvider
11 | {
12 | private readonly QueryableEnumerable _queryable;
13 |
14 | public EnumerableQuery(Expression expression)
15 | {
16 | _queryable = new QueryableEnumerable(expression);
17 | }
18 |
19 | public EnumerableQuery(IEnumerable enumerable)
20 | {
21 | _queryable = new QueryableEnumerable(enumerable);
22 | }
23 |
24 | Type IQueryable.ElementType
25 | {
26 | get { return _queryable.ElementType; }
27 | }
28 |
29 | Expression IQueryable.Expression
30 | {
31 | get { return _queryable.Expression; }
32 | }
33 |
34 | IQueryProvider IQueryable.Provider
35 | {
36 | get { return _queryable; }
37 | }
38 |
39 | IEnumerator IEnumerable.GetEnumerator()
40 | {
41 | return _queryable.GetEnumerator();
42 | }
43 |
44 | IEnumerator IEnumerable.GetEnumerator()
45 | {
46 | return _queryable.GetEnumerator();
47 | }
48 |
49 | IQueryable IQueryProvider.CreateQuery(Expression expression)
50 | {
51 | return _queryable.CreateQuery(expression);
52 | }
53 |
54 | IQueryable IQueryProvider.CreateQuery(Expression expression)
55 | {
56 | return new EnumerableQuery(expression);
57 | }
58 |
59 | object IQueryProvider.Execute(Expression expression)
60 | {
61 | return _queryable.Execute(expression);
62 | }
63 |
64 | TResult IQueryProvider.Execute(Expression expression)
65 | {
66 | return _queryable.Execute(expression);
67 | }
68 |
69 | public override string ToString()
70 | {
71 | return _queryable.ToString();
72 | }
73 | }
74 | }
75 |
76 | #endif
--------------------------------------------------------------------------------
/Core/System/Linq/Expressions/Compiler/AnalyzedTree.net30.cs:
--------------------------------------------------------------------------------
1 | #if NET20 || NET30
2 |
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 |
6 | using System.Collections.Generic;
7 |
8 | namespace Theraot.Core.System.Linq.Expressions.Compiler
9 | {
10 | internal sealed class AnalyzedTree
11 | {
12 | internal readonly Dictionary