├── .Art ├── logo.png └── logo.psd ├── .Build └── Build.cake ├── .Doc └── docfx_project │ ├── .gitignore │ ├── ExtendTemplate │ └── partials │ │ ├── class.header.tmpl.partial │ │ └── navbar.tmpl.partial │ ├── api │ ├── .gitignore │ ├── .manifest │ └── index.md │ ├── docfx.json │ ├── images │ └── logo.png │ ├── index.md │ └── toc.yml ├── .Src ├── Extend.Testing │ ├── Extend.Testing.csproj │ ├── Models │ │ ├── AttributeDefinitionPropertyTest.cs │ │ ├── AttributeDefinitionTypeTest.cs │ │ ├── ExecutionResultTest.cs │ │ └── IndexedItemTest.cs │ ├── PortableExtensions.ISpecification[T] │ │ ├── ISpecification.And.Test.cs │ │ ├── ISpecification.Or.Test.cs │ │ └── ISpecification.XOr.Test.cs │ ├── System.Action │ │ ├── Action.ExecuteIfAnyFalse.Test.cs │ │ ├── Action.ExecuteIfAnyTrue.Test.cs │ │ ├── Action.ExecuteIfFalse.Test.cs │ │ ├── Action.ExecuteIfTrue.Test.cs │ │ ├── Action.SafeExecute.Test.cs │ │ └── Action.SafeExecuteExcept.Test.cs │ ├── System.Array │ │ ├── Array.Clear.Test.cs │ │ ├── Array.ClearAll.Test.cs │ │ ├── Array.Copy.cs │ │ ├── Array.IndexOf.Test.cs │ │ ├── Array.LastIndexOf.Test.cs │ │ ├── Array.Reverse.Test.cs │ │ ├── Array.ToList.Test.cs │ │ ├── Array.WithinIndex.Test.cs │ │ └── System.Array.Generic │ │ │ ├── Array.Generic.Clear.Test.cs │ │ │ ├── Array.Generic.ClearAll.Test.cs │ │ │ ├── Array.Generic.IndexOf.Test.cs │ │ │ ├── Array.Generic.LastIndexOf.Test.cs │ │ │ ├── Array.Generic.Populate.Test.cs │ │ │ ├── Array.Generic.Resize.Test.cs │ │ │ ├── Array.Generic.Reverse.Test.cs │ │ │ ├── Array.Generic.Slice.Test.cs │ │ │ └── Array.Generic.ToGenericList.Test.cs │ ├── System.Assembly │ │ ├── Assembly.GetAttributes.Test.cs │ │ ├── Assembly.GetDefinedTypes.Test.cs │ │ └── Assembly.GetTypesWithAttribute.Test.cs │ ├── System.Boolean │ │ ├── Boolean.IfFalse.Test.cs │ │ ├── Boolean.IfTrue.Test.cs │ │ └── Boolean.Select.Test.cs │ ├── System.Char │ │ ├── Char.IsDigit.Test.cs │ │ ├── Char.IsLetter.Test.cs │ │ ├── Char.IsLetterOrDigit.Test.cs │ │ ├── Char.IsLower.Test.cs │ │ ├── Char.IsNumber.Test.cs │ │ ├── Char.IsUpper.Test.cs │ │ ├── Char.IsWhiteSpace.Test.cs │ │ ├── Char.Repeat.Test.cs │ │ ├── Char.ToLower.Test.cs │ │ └── Char.ToUpper.Test.cs │ ├── System.Collections.Generic.ICollection[T] │ │ ├── ICollection[T].AddIf.Test.cs │ │ ├── ICollection[T].AddIfNotContains.Test.cs │ │ ├── ICollection[T].AddRange.Test.cs │ │ ├── ICollection[T].AddRangeIf.Test.cs │ │ ├── ICollection[T].AddRangeIfNotContains.Test.cs │ │ ├── ICollection[T].RemoveIf.Test.cs │ │ ├── ICollection[T].RemoveRange.Test.cs │ │ └── ICollection[T].RemoveRangeIf.Test.cs │ ├── System.Collections.Generic.IDictionary[K, V] │ │ ├── IDictionary[K, V].AddIfNotContainsKey.Test.cs │ │ ├── IDictionary[K, V].AddOrUpdate.Test.cs │ │ ├── IDictionary[K, V].AddRange.Test.cs │ │ ├── IDictionary[K, V].ConcatAllToDictionary.Test.cs │ │ ├── IDictionary[K, V].ConcatAllToDictionarySafe.Test.cs │ │ ├── IDictionary[K, V].ConcatToDictionary.Test.cs │ │ ├── IDictionary[K, V].ConcatToDictionarySafe.Test.cs │ │ ├── IDictionary[K, V].ContainsAllKey.Test.cs │ │ ├── IDictionary[K, V].ContainsAnyKey.Test.cs │ │ ├── IDictionary[K, V].GetAllKeys.Test.cs │ │ ├── IDictionary[K, V].GetAllKeysAsList.Test.cs │ │ ├── IDictionary[K, V].GetOrAdd.Test.cs │ │ └── IDictionary[K, V].StringJoin.Test.cs │ ├── System.Collections.Generic.IEnumerable[String] │ │ └── IEnumerable[String].PathCombine.Test.cs │ ├── System.Collections.Generic.IEnumerable[T] │ │ ├── IEnumerable[T].AnyAndNotNull.Test.cs │ │ ├── IEnumerable[T].Append.Test.cs │ │ ├── IEnumerable[T].ContainsAll.Test.cs │ │ ├── IEnumerable[T].ContainsAny.Test.cs │ │ ├── IEnumerable[T].Distinct.Test.cs │ │ ├── IEnumerable[T].EnsureNotNull.Test.cs │ │ ├── IEnumerable[T].Except.Test.cs │ │ ├── IEnumerable[T].ForEach.Test.cs │ │ ├── IEnumerable[T].ForEachReverse.Test.cs │ │ ├── IEnumerable[T].ForEachReverseAsync.Test.cs │ │ ├── IEnumerable[T].GetEqualItemsFromStart.cs │ │ ├── IEnumerable[T].GetRandomItem.Test.cs │ │ ├── IEnumerable[T].Intersect.Test.cs │ │ ├── IEnumerable[T].IsNullOrEmpty.Test.cs │ │ ├── IEnumerable[T].Many.Test.cs │ │ ├── IEnumerable[T].MinimumOf.Test.cs │ │ ├── IEnumerable[T].NotAny.Test.cs │ │ ├── IEnumerable[T].Partition.Test.cs │ │ ├── IEnumerable[T].Prepend.Test.cs │ │ ├── IEnumerable[T].Randomize.Test.cs │ │ ├── IEnumerable[T].SpecificationForItems.Test.cs │ │ ├── IEnumerable[T].StringJoin.Test.cs │ │ ├── IEnumerable[T].TakeUntil.Test.cs │ │ ├── IEnumerable[T].ToDictionary.Test.cs │ │ ├── IEnumerable[T].ToHashSet.Test.cs │ │ ├── IEnumerable[T].ToObservableCollection.Test.cs │ │ ├── IEnumerable[T].ToTreeNodeCollection.cs │ │ ├── IEnumerable[T].Where.Test.cs │ │ ├── IEnumerable[T].WhereIf.Test.cs │ │ ├── IEnumerable[T].WhereNot.Test.cs │ │ ├── IEnumerable[T].WithIndex.Test.cs │ │ └── IEnumerable[T].WithoutIndex.Test.cs │ ├── System.Collections.Generic.IEqualityComparer[T] │ │ └── IEqualityComparer[T].By.Test.cs │ ├── System.DateTime │ │ ├── DateTime.Age.Test.cs │ │ ├── DateTime.Elapsed.Test.cs │ │ ├── DateTime.EndOfDay.Test.cs │ │ ├── DateTime.EndOfMonth.Test.cs │ │ ├── DateTime.EndOfWeek.Test.cs │ │ ├── DateTime.EndOfYear.Test.cs │ │ ├── DateTime.FirstDayOfWeek.Test.cs │ │ ├── DateTime.GetWeekOfYear.Test.cs │ │ ├── DateTime.Intersects.Test.cs │ │ ├── DateTime.IsAfternoon.Test.cs │ │ ├── DateTime.IsFuture.Test.cs │ │ ├── DateTime.IsLastDayOfMonth.Test.cs │ │ ├── DateTime.IsMorning.Test.cs │ │ ├── DateTime.IsPast.Test.cs │ │ ├── DateTime.IsSameDay.Test.cs │ │ ├── DateTime.IsSameMonthAndYear.Test.cs │ │ ├── DateTime.IsTimeEquals.Test.cs │ │ ├── DateTime.IsToday.Test.cs │ │ ├── DateTime.IsWeekDay.Test.cs │ │ ├── DateTime.IsWeekendDay.Test.cs │ │ ├── DateTime.LastDayOfWeek.Test.cs │ │ ├── DateTime.NextMonthStart.Test.cs │ │ ├── DateTime.NextWeekDay.cs │ │ ├── DateTime.StartOfDay.Test.cs │ │ ├── DateTime.StartOfMonth.Test.cs │ │ ├── DateTime.StartOfWeek.Test.cs │ │ ├── DateTime.StartOfYear.Test.cs │ │ ├── DateTime.Tomorrow.Test.cs │ │ ├── DateTime.Yesterday.Test.cs │ │ └── ToDateTimeFormat │ │ │ ├── DateTime.ToFullDateTimeString.Test.cs │ │ │ ├── DateTime.ToLongDateShortTimeString.Test.cs │ │ │ ├── DateTime.ToLongDateString.Test.cs │ │ │ ├── DateTime.ToLongTimeString.Test.cs │ │ │ ├── DateTime.ToMonthDayString.Test.cs │ │ │ ├── DateTime.ToMonthString.Test.cs │ │ │ ├── DateTime.ToShortDateLongTimeString.Test.cs │ │ │ ├── DateTime.ToShortDateString.Test.cs │ │ │ ├── DateTime.ToShortDateTimeString.Test.cs │ │ │ ├── DateTime.ToShortTimeString.Test.cs │ │ │ ├── DateTime.ToSortableDateTimeString.Test.cs │ │ │ ├── DateTime.ToUniversalSortableDateTimeString.Test.cs │ │ │ ├── DateTime.ToUniversalSortableLongDateTimeString.Test.cs │ │ │ └── DateTime.ToYearMonthString.Test.cs │ ├── System.Decimal │ │ ├── Decimal.PercentOf.Test.cs │ │ ├── Decimal.PercentageOf.Test.cs │ │ └── Decimal.Sum.Test.cs │ ├── System.Double │ │ ├── Double.IsInfinit.yTest.cs │ │ ├── Double.IsNaN.Test.cs │ │ ├── Double.IsNegativeInfinit.yTest.cs │ │ ├── Double.IsPositiveInfinit.yTest.cs │ │ ├── Double.PercentOf.Test.cs │ │ ├── Double.PercentageOf.Test.cs │ │ ├── Double.Sum.Test.cs │ │ └── System.TimeSpan │ │ │ ├── Double.ToDays.Test.cs │ │ │ ├── Double.ToHours.Test.cs │ │ │ ├── Double.ToMilliseconds.Test.cs │ │ │ ├── Double.ToMinutes.Test.cs │ │ │ └── Double.ToSeconds.Test.cs │ ├── System.Enum │ │ ├── Enum.GetFlags.Test.cs │ │ ├── Enum.GetStringValues.Test.cs │ │ ├── Enum.GetValueAndStringValue.Test.cs │ │ ├── Enum.GetValues.Test.cs │ │ └── Enum.GetValuesExpect.Test.cs │ ├── System.EventHandler │ │ └── EventHandler.Raise.Test.cs │ ├── System.Exception │ │ └── Exception.FormatException.cs │ ├── System.IComparable[T] │ │ ├── IComparable[T].Between.Test.cs │ │ ├── IComparable[T].BetweenInclusive.Test.cs │ │ ├── IComparable[T].Greater.Test.cs │ │ ├── IComparable[T].GreaterOrEquals.Test.cs │ │ ├── IComparable[T].Smaller.Test.cs │ │ └── IComparable[T].SmallerOrEquals.Test.cs │ ├── System.Int16 │ │ ├── Int16.FactorOf.Test.cs │ │ ├── Int16.IsEven.Test.cs │ │ ├── Int16.IsMultipleOf.Test.cs │ │ ├── Int16.IsOdd.Test.cs │ │ ├── Int16.PercentOf.Test.cs │ │ ├── Int16.PercentageOf.Test.cs │ │ ├── Int16.RangeTo.Test.cs │ │ ├── System.DateTime │ │ │ ├── Int16.DaysInMonth.Test.cs │ │ │ ├── Int16.IsLeapYear.Test.cs │ │ │ └── System.DateTime │ │ │ │ ├── Int16.April.Test.cs │ │ │ │ ├── Int16.August.Test.cs │ │ │ │ ├── Int16.December.Test.cs │ │ │ │ ├── Int16.February.Test.cs │ │ │ │ ├── Int16.January.Test.cs │ │ │ │ ├── Int16.July.Test.cs │ │ │ │ ├── Int16.June.Test.cs │ │ │ │ ├── Int16.March.Test.cs │ │ │ │ ├── Int16.May.Test.cs │ │ │ │ ├── Int16.November.Test.cs │ │ │ │ ├── Int16.October.Test.cs │ │ │ │ └── Int16.September.Test.cs │ │ └── System.TimeSpan │ │ │ ├── Int16.ToDays.Test.cs │ │ │ ├── Int16.ToHours.Test.cs │ │ │ ├── Int16.ToMilliseconds.Test.cs │ │ │ ├── Int16.ToMinutes.Test.cs │ │ │ └── Int16.ToSeconds.Test.cs │ ├── System.Int32 │ │ ├── Int32.FactorOf.Test.cs │ │ ├── Int32.IsEven.Test.cs │ │ ├── Int32.IsMultipleOf.Test.cs │ │ ├── Int32.IsOdd.Test.cs │ │ ├── Int32.PercentOf.Test.cs │ │ ├── Int32.PercentageOf.Test.cs │ │ ├── Int32.RangeTo.Test.cs │ │ ├── Int32.Sum.Test.cs │ │ ├── System.DateTime │ │ │ ├── Int32.DaysInMonth.Test.cs │ │ │ ├── Int32.IsLeapYear.Test.cs │ │ │ └── System.DateTime │ │ │ │ ├── Int32.April.Test.cs │ │ │ │ ├── Int32.August.Test.cs │ │ │ │ ├── Int32.December.Test.cs │ │ │ │ ├── Int32.February.Test.cs │ │ │ │ ├── Int32.January.Test.cs │ │ │ │ ├── Int32.July.Test.cs │ │ │ │ ├── Int32.June.Test.cs │ │ │ │ ├── Int32.March.Test.cs │ │ │ │ ├── Int32.May.Test.cs │ │ │ │ ├── Int32.November.Test.cs │ │ │ │ ├── Int32.October.Test.cs │ │ │ │ └── Int32.September.Test.cs │ │ └── System.TimeSpan │ │ │ ├── Int32.ToDays.Test.cs │ │ │ ├── Int32.ToHours.Test.cs │ │ │ ├── Int32.ToMilliseconds.Test.cs │ │ │ ├── Int32.ToMinutes.Test.cs │ │ │ └── Int32.ToSeconds.Test.cs │ ├── System.Int64 │ │ ├── Int64.FactorOf.Test.cs │ │ ├── Int64.IsEven.Test.cs │ │ ├── Int64.IsMultipleOf.Test.cs │ │ ├── Int64.IsOdd.Test.cs │ │ ├── Int64.PercentOf.Test.cs │ │ ├── Int64.PercentageOf.Test.cs │ │ ├── Int64.RangeTo.Test.cs │ │ ├── Int64.Sum.Test.cs │ │ └── System.TimeSpan │ │ │ ├── Int64.ToDays.Test.cs │ │ │ ├── Int64.ToHours.Test.cs │ │ │ ├── Int64.ToMilliseconds.Test.cs │ │ │ ├── Int64.ToMinutes.Test.cs │ │ │ └── Int64.ToSeconds.Test.cs │ ├── System.Lazy[T] │ │ └── Layz[T].DisposeIfIsValueCreated.Test.cs │ ├── System.Linq.Expressions.Expression │ │ └── Expression.TryGetMemberExpression.Test.cs │ ├── System.Linq.Expressions.Expression[TDelegate] │ │ ├── Expression[TDelegate].GetMemberInfoFromExpression.Test.cs │ │ └── Expression[TDelegate].GetMemberPath.Test.cs │ ├── System.Object │ │ ├── Convert │ │ │ ├── Object.ToBoolean.Test.cs │ │ │ ├── Object.ToByte.Test.cs │ │ │ ├── Object.ToChar.Test.cs │ │ │ ├── Object.ToDateTime.Test.cs │ │ │ ├── Object.ToDecimal.Test.cs │ │ │ ├── Object.ToDouble.Test.cs │ │ │ ├── Object.ToInt16.Test.cs │ │ │ ├── Object.ToInt32.Test.cs │ │ │ └── Object.ToInt64.Test.cs │ │ ├── Generic │ │ │ ├── Object.Generic.Chain.Test.cs │ │ │ ├── Object.Generic.Coalesce.Test.cs │ │ │ ├── Object.Generic.CoalesceOrDefault.Test.cs │ │ │ ├── Object.Generic.ExecuteSafe.Test.cs │ │ │ ├── Object.Generic.GetName.Test.cs │ │ │ ├── Object.Generic.GetNameChain.Test.cs │ │ │ ├── Object.Generic.IfNull.Test.cs │ │ │ ├── Object.Generic.IsDefault.Test.cs │ │ │ ├── Object.Generic.IsIn.Test.cs │ │ │ ├── Object.Generic.IsNotIn.Test.cs │ │ │ ├── Object.Generic.Maximum.Test.cs │ │ │ ├── Object.Generic.Minimum.Test.cs │ │ │ ├── Object.Generic.Satisfies.Test.cs │ │ │ ├── Object.Generic.SatisfiesWithMessages.Test.cs │ │ │ ├── Object.Generic.Specification.Test.cs │ │ │ ├── Object.Generic.Swap.Test.cs │ │ │ ├── Object.Generic.ThrowIfNull.Test.cs │ │ │ └── Object.Generic.ToSingleItemArray.Test.cs │ │ ├── Object.As.Test.cs │ │ ├── Object.IsNotNull.Test.cs │ │ ├── Object.IsNull.Test.cs │ │ └── Object.ReferenceEquals.Test.cs │ ├── System.Random │ │ ├── Random.CoinToss.Test.cs │ │ └── Random.OneOf.Test.cs │ ├── System.Reflection.PropertyInfo │ │ ├── PropertyInfo.GetValueWithoutIndex.Test.cs │ │ └── PropertyInfo.ToMemberInformation.Test.cs │ ├── System.String │ │ ├── Convert │ │ │ ├── String.ToBoolean.Test.cs │ │ │ ├── String.ToByte.Test.cs │ │ │ ├── String.ToChar.Test.cs │ │ │ ├── String.ToDateTime.Test.cs │ │ │ ├── String.ToDecimal.Test.cs │ │ │ ├── String.ToDouble.Test.cs │ │ │ ├── String.ToGuid.Test.cs │ │ │ ├── String.ToInt16.Test.cs │ │ │ ├── String.ToInt32.Test.cs │ │ │ └── String.ToInt64.Test.cs │ │ ├── ConvertSafe │ │ │ ├── String.SafeToBoolean.Test.cs │ │ │ ├── String.SafeToByte.Test.cs │ │ │ ├── String.SafeToChar.Test.cs │ │ │ ├── String.SafeToDateTime.Test.cs │ │ │ ├── String.SafeToDecimal.Test.cs │ │ │ ├── String.SafeToDouble.Test.cs │ │ │ ├── String.SafeToGuid.Test.cs │ │ │ ├── String.SafeToInt16.Test.cs │ │ │ ├── String.SafeToInt32.Test.cs │ │ │ └── String.SafeToInt64.Test.cs │ │ ├── ExtractNumbers │ │ │ ├── String.ExtractAllDecimal.Test.cs │ │ │ ├── String.ExtractAllDouble.Test.cs │ │ │ ├── String.ExtractAllInt16.Test.cs │ │ │ ├── String.ExtractAllInt32.Test.cs │ │ │ ├── String.ExtractAllInt64.Test.cs │ │ │ ├── String.ExtractFirstDecimal.Test.cs │ │ │ ├── String.ExtractFirstDouble.Test.cs │ │ │ ├── String.ExtractFirstInt16.Test.cs │ │ │ ├── String.ExtractFirstInt32.Test.cs │ │ │ └── String.ExtractFirstInt64.Test.cs │ │ ├── Pars │ │ │ ├── String.TryParsBoolean.Test.cs │ │ │ ├── String.TryParsByte.Test.cs │ │ │ ├── String.TryParsChar.Test.cs │ │ │ ├── String.TryParsDateTime.Test.cs │ │ │ ├── String.TryParsDateTimeExact.Test.cs │ │ │ ├── String.TryParsDecimal.Test.cs │ │ │ ├── String.TryParsDouble.Test.cs │ │ │ ├── String.TryParsGuid.Test.cs │ │ │ ├── String.TryParsInt16.Test.cs │ │ │ ├── String.TryParsInt32.Test.cs │ │ │ └── String.TryParsInt64.Test.cs │ │ ├── String.AppendWithNewLineIfNotEmpty.Test.cs │ │ ├── String.ChangeType.Test.cs │ │ ├── String.CharAt.Test.cs │ │ ├── String.CompareOrdinal.Test.cs │ │ ├── String.CompareOrdinalIgnoreCase.Test.cs │ │ ├── String.ConcatAll.Test.cs │ │ ├── String.Contains.Test.cs │ │ ├── String.ContainsAll.Test.cs │ │ ├── String.ContainsAny.Test.cs │ │ ├── String.Extract.Test.cs │ │ ├── String.ExtractLetters.Test.cs │ │ ├── String.ExtractNumbers.Test.cs │ │ ├── String.F.Test.cs │ │ ├── String.FormatFileExtension.Test.cs │ │ ├── String.GetAfter.Test.cs │ │ ├── String.GetBefore.Test.cs │ │ ├── String.GetBetween.Test.cs │ │ ├── String.GetLines.Test.cs │ │ ├── String.IfNotEmpty.Test.cs │ │ ├── String.IsAlpha.Test.cs │ │ ├── String.IsAlphaNumeric.Test.cs │ │ ├── String.IsEmpty.Test.cs │ │ ├── String.IsNotEmpty.Test.cs │ │ ├── String.IsNumeric.Test.cs │ │ ├── String.Join.Test.cs │ │ ├── String.KeepLetters.Test.cs │ │ ├── String.KeepLettersAndNumbers.Test.cs │ │ ├── String.KeepNumbers.Test.cs │ │ ├── String.KeepWhere.Test.cs │ │ ├── String.Left.Test.cs │ │ ├── String.RemoveLetters.Test.cs │ │ ├── String.RemoveLettersAndNumbers.Test.cs │ │ ├── String.RemoveNumbers.Test.cs │ │ ├── String.RemoveWhere.Test.cs │ │ ├── String.Repeat.Test.cs │ │ ├── String.ReplaceAt.Test.cs │ │ ├── String.ReplaceByEmpty.Test.cs │ │ ├── String.Reverse.Test.cs │ │ ├── String.Right.Test.cs │ │ ├── String.SafeToCultureInfo.Test.cs │ │ ├── String.Split.Test.cs │ │ ├── String.SplitLines.Test.cs │ │ ├── String.SubstringLeft.Test.cs │ │ ├── String.SubstringLeftSafe.Test.cs │ │ ├── String.SubstringRight.Test.cs │ │ ├── String.SubstringRightSafe.Test.cs │ │ ├── String.TakeAndRemove.Test.cs │ │ ├── String.ToCultureInfo.Test.cs │ │ ├── String.ToEnum.Test.cs │ │ ├── String.Truncate.Test.cs │ │ ├── String.TryToEnum.Test.cs │ │ ├── String.WildcardToRegex.Test.cs │ │ ├── System.IO.Path │ │ │ └── String.GetFileExtension.Test.cs │ │ └── System.Text.RegularExpressions.Regex │ │ │ ├── String.IsMatch.Test.cs │ │ │ ├── String.IsNotMatch.Test.cs │ │ │ ├── String.Match.Test.cs │ │ │ └── String.Matches.Test.cs │ ├── System.Text.StringBuilder │ │ └── StringBuilder.AppendLineFormat.Test.cs │ ├── System.TimeSpan │ │ ├── TimeSpan.Future.Test.cs │ │ └── TimeSpan.Past.Test.cs │ ├── System.Type │ │ ├── Type.GetAttributeDefinitions.Test.cs │ │ ├── Type.GetDeclaringAssembly.Test.cs │ │ ├── Type.GetGenericTypeArgument.Test.cs │ │ ├── Type.GetGenericTypeArguments.Test.cs │ │ ├── Type.GetImplementedInterfaces.Test.cs │ │ ├── Type.GetNameWithNamespace.Test.cs │ │ ├── Type.GetPublicProperties.Test.cs │ │ ├── Type.GetPublicSettableProperties.Test.cs │ │ ├── Type.GetTypeFromNullable.cs │ │ ├── Type.ImplementsICollectionT.Test.cs │ │ ├── Type.IsEnum.Test.cs │ │ ├── Type.IsGenericType.Test.cs │ │ ├── Type.IsICollectionT.Test.cs │ │ ├── Type.IsIEnumerableT.Test.cs │ │ ├── Type.IsIListT.Test.cs │ │ └── Type.IsMicrosoftType.Test.cs │ └── Utilities │ │ ├── Compare │ │ └── KeyEqualityComparerTest.cs │ │ ├── ExpressionEvaluator │ │ └── ExpressionEvaluator.Test.cs │ │ ├── InstanceBuilder │ │ ├── Creator │ │ │ └── InstanceCreatorTest.cs │ │ ├── Exception │ │ │ └── CreateInstanceExceptionTest.cs │ │ ├── Extension │ │ │ └── MemberSelectionResultExTest.cs │ │ ├── Factory │ │ │ ├── Base │ │ │ │ └── InstanceFactoryBaseTest.cs │ │ │ └── ExpressionInstanceFactoryTest.cs │ │ ├── FluentInterface │ │ │ └── CreateInstanceOptionsTest.cs │ │ ├── MemberInformation │ │ │ └── MemberInformationTest.cs │ │ └── MemberSelection │ │ │ ├── Inspector │ │ │ └── MemberSelectionRuleInspectorTest.cs │ │ │ └── Rules │ │ │ ├── AllMemberSelectionRuleTest.cs │ │ │ ├── Base │ │ │ └── MemberSelectionRuleBaseTest.cs │ │ │ ├── ExpressionMemberSelectionRuleTest.cs │ │ │ ├── PathMemberSelectionRuleTest.cs │ │ │ └── TypeMemberSelectionRuleTest.cs │ │ ├── Specification │ │ ├── AndSpecification.Test.cs │ │ ├── ExpressionSpecification.Test.cs │ │ ├── OrSpecification.Test.cs │ │ └── XOrSpecification.Test.cs │ │ ├── StringTemplate │ │ ├── Model │ │ │ └── FormatInformationTest.cs │ │ ├── StringTemplate.Test.cs │ │ └── ValueProvider │ │ │ ├── LookuptValueProviderTest.cs │ │ │ └── ObjectValueProviderTest.cs │ │ ├── Tree │ │ ├── TreeNodeCollectionTest.cs │ │ └── TreeNodeTest.cs │ │ └── Utilities.RandomValueEx.Test.cs ├── Extend.sln └── Extend │ ├── Extend.csproj │ ├── Extend.snk │ ├── JetBrains.Annotations.cs │ ├── Models │ ├── AttributeDefinitionProperty.cs │ ├── AttributeDefinitionType.cs │ ├── Definitions │ │ ├── IAttributeDefinitionProperty.cs │ │ ├── IAttributeDefinitionType.cs │ │ ├── IExecutionResult.cs │ │ └── IIndexedItem.cs │ ├── ExecutionResult.cs │ └── IndexedItem.cs │ ├── PortableExtensions.ISpecification[T] │ ├── ISpecification.And.cs │ ├── ISpecification.Or.cs │ └── ISpecification.XOr.cs │ ├── System.Action │ ├── Action.ExecuteIfAnyFalse.cs │ ├── Action.ExecuteIfAnyTrue.cs │ ├── Action.ExecuteIfFalse.cs │ ├── Action.ExecuteIfTrue.cs │ ├── Action.SafeExecute.cs │ └── Action.SafeExecuteExcept.cs │ ├── System.Array │ ├── Array.Clear.cs │ ├── Array.ClearAll.cs │ ├── Array.Copy.cs │ ├── Array.IndexOf.cs │ ├── Array.LastIndexOf.cs │ ├── Array.Reverse.cs │ ├── Array.ToList.cs │ ├── Array.WithinIndex.cs │ └── System.Array.Generic │ │ ├── Array.Generic.Clear.cs │ │ ├── Array.Generic.ClearAll.cs │ │ ├── Array.Generic.IndexOf.cs │ │ ├── Array.Generic.LastIndexOf.cs │ │ ├── Array.Generic.Populate.cs │ │ ├── Array.Generic.Resize.cs │ │ ├── Array.Generic.Reverse.cs │ │ ├── Array.Generic.Slice.cs │ │ └── Array.Generic.ToGenericList.cs │ ├── System.Assembly │ ├── Assembly.GetAttributes.cs │ ├── Assembly.GetDefinedTypes.cs │ └── Assembly.GetTypesWithAttribute.cs │ ├── System.Boolean │ ├── Boolean.IfFalse.cs │ ├── Boolean.IfTrue.cs │ └── Boolean.Select.cs │ ├── System.Char │ ├── Char.IsDigit.cs │ ├── Char.IsLetter.cs │ ├── Char.IsLetterOrDigit.cs │ ├── Char.IsLower.cs │ ├── Char.IsNumber.cs │ ├── Char.IsUpper.cs │ ├── Char.IsWhiteSpace.cs │ ├── Char.Repeat.cs │ ├── Char.ToLower.cs │ └── Char.ToUpper.cs │ ├── System.Collections.Generic.ICollection[T] │ ├── ICollection[T].AddIf.cs │ ├── ICollection[T].AddIfNotContains.cs │ ├── ICollection[T].AddRange.cs │ ├── ICollection[T].AddRangeIf.cs │ ├── ICollection[T].AddRangeIfNotContains.cs │ ├── ICollection[T].RemoveIf.cs │ ├── ICollection[T].RemoveRange.cs │ └── ICollection[T].RemoveRangeIf.cs │ ├── System.Collections.Generic.IDictionary[K, V] │ ├── IDictionary[K, V].AddIfNotContainsKey.cs │ ├── IDictionary[K, V].AddOrUpdate.cs │ ├── IDictionary[K, V].AddRange.cs │ ├── IDictionary[K, V].ConcatAllToDictionary.cs │ ├── IDictionary[K, V].ConcatAllToDictionarySafe.cs │ ├── IDictionary[K, V].ConcatToDictionary.cs │ ├── IDictionary[K, V].ConcatToDictionarySafe.cs │ ├── IDictionary[K, V].ContainsAllKey.cs │ ├── IDictionary[K, V].ContainsAnyKey.cs │ ├── IDictionary[K, V].GetAllKeys.cs │ ├── IDictionary[K, V].GetAllKeysAsList.cs │ ├── IDictionary[K, V].GetOrAdd.cs │ └── IDictionary[K, V].StringJoin.cs │ ├── System.Collections.Generic.IEnumerable[String] │ └── IEnumerable[String].PathCombine.cs │ ├── System.Collections.Generic.IEnumerable[T] │ ├── IEnumerable[T].AnyAndNotNull.cs │ ├── IEnumerable[T].Append.cs │ ├── IEnumerable[T].ContainsAll.cs │ ├── IEnumerable[T].ContainsAny.cs │ ├── IEnumerable[T].Distinct.cs │ ├── IEnumerable[T].EnsureNotNull.cs │ ├── IEnumerable[T].Except.cs │ ├── IEnumerable[T].ForEach.cs │ ├── IEnumerable[T].ForEachReverse.cs │ ├── IEnumerable[T].ForEachReverseAsync.cs │ ├── IEnumerable[T].GetEqualItemsFromStart.cs │ ├── IEnumerable[T].GetRandomItem.cs │ ├── IEnumerable[T].Intersect.cs │ ├── IEnumerable[T].IsNullOrEmpty.cs │ ├── IEnumerable[T].Many.cs │ ├── IEnumerable[T].MinimumOf.cs │ ├── IEnumerable[T].NotAny.cs │ ├── IEnumerable[T].Partition.cs │ ├── IEnumerable[T].Prepend.cs │ ├── IEnumerable[T].Randomize.cs │ ├── IEnumerable[T].SpecificationForItems.cs │ ├── IEnumerable[T].StringJoin.cs │ ├── IEnumerable[T].TakeUntil.cs │ ├── IEnumerable[T].ToDictionary.cs │ ├── IEnumerable[T].ToHashSet.cs │ ├── IEnumerable[T].ToObservableCollection.cs │ ├── IEnumerable[T].ToTreeNodeCollection.cs │ ├── IEnumerable[T].Where.cs │ ├── IEnumerable[T].WhereIf.cs │ ├── IEnumerable[T].WhereNot.cs │ ├── IEnumerable[T].WithIndex.cs │ └── IEnumerable[T].WithoutIndex.cs │ ├── System.Collections.Generic.IEqualityComparer[T] │ └── IEqualityComparer[T].By.cs │ ├── System.DateTime │ ├── DateTime.Age.cs │ ├── DateTime.Elapsed.cs │ ├── DateTime.EndOfDay.cs │ ├── DateTime.EndOfMonth.cs │ ├── DateTime.EndOfWeek.cs │ ├── DateTime.EndOfYear.cs │ ├── DateTime.FirstDayOfWeek.cs │ ├── DateTime.GetWeekOfYear.cs │ ├── DateTime.Intersects.cs │ ├── DateTime.IsAfternoon.cs │ ├── DateTime.IsFuture.cs │ ├── DateTime.IsLastDayOfMonth.cs │ ├── DateTime.IsMorning.cs │ ├── DateTime.IsPast.cs │ ├── DateTime.IsSameDay.cs │ ├── DateTime.IsSameMonthAndYear.cs │ ├── DateTime.IsTimeEquals.cs │ ├── DateTime.IsToday.cs │ ├── DateTime.IsWeekDay.cs │ ├── DateTime.IsWeekendDay.cs │ ├── DateTime.LastDayOfWeek.cs │ ├── DateTime.NextMonthStart.cs │ ├── DateTime.NextWeekDay.cs │ ├── DateTime.StartOfDay.cs │ ├── DateTime.StartOfMonth.cs │ ├── DateTime.StartOfWeek.cs │ ├── DateTime.StartOfYear.cs │ ├── DateTime.Tomorrow.cs │ ├── DateTime.Yesterday.cs │ └── ToDateTimeFormat │ │ ├── DateTime.ToFullDateTimeString.cs │ │ ├── DateTime.ToLongDateShortTimeString.cs │ │ ├── DateTime.ToLongDateString.cs │ │ ├── DateTime.ToLongTimeString.cs │ │ ├── DateTime.ToMonthDayString.cs │ │ ├── DateTime.ToMonthString.cs │ │ ├── DateTime.ToShortDateLongTimeString.cs │ │ ├── DateTime.ToShortDateString.cs │ │ ├── DateTime.ToShortDateTimeString.cs │ │ ├── DateTime.ToShortTimeString.cs │ │ ├── DateTime.ToSortableDateTimeString.cs │ │ ├── DateTime.ToUniversalSortableDateTimeString.cs │ │ ├── DateTime.ToUniversalSortableLongDateTimeString.cs │ │ └── DateTime.ToYearMonthString.cs │ ├── System.Decimal │ ├── Decimal.PercentOf.cs │ ├── Decimal.PercentageOf.cs │ └── Decimal.Sum.cs │ ├── System.Double │ ├── Double.IsInfinity.cs │ ├── Double.IsNaN.cs │ ├── Double.IsNegativeInfinity.cs │ ├── Double.IsPositiveInfinity.cs │ ├── Double.PercentOf.cs │ ├── Double.PercentageOf.cs │ ├── Double.Sum.cs │ └── System.TimeSpan │ │ ├── Double.ToDays.cs │ │ ├── Double.ToHours.cs │ │ ├── Double.ToMilliseconds.cs │ │ ├── Double.ToMinutes.cs │ │ └── Double.ToSeconds.cs │ ├── System.Enum │ ├── Enum.GetFlags.cs │ ├── Enum.GetStringValues.cs │ ├── Enum.GetValueAndStringValue.cs │ ├── Enum.GetValues.cs │ └── Enum.GetValuesExpect.cs │ ├── System.EventHandler │ └── EventHandler.Raise.cs │ ├── System.Exception │ └── Exception.FormatException.cs │ ├── System.IComparable[T] │ ├── IComparable[T].Between.cs │ ├── IComparable[T].BetweenInclusive.cs │ ├── IComparable[T].Greater.cs │ ├── IComparable[T].GreaterOrEquals.cs │ ├── IComparable[T].Smaller.cs │ └── IComparable[T].SmallerOrEquals.cs │ ├── System.Int16 │ ├── Int16.FactorOf.cs │ ├── Int16.IsEven.cs │ ├── Int16.IsMultipleOf.cs │ ├── Int16.IsOdd.cs │ ├── Int16.PercentOf.cs │ ├── Int16.PercentageOf.cs │ ├── Int16.RangeTo.cs │ ├── System.DateTime │ │ ├── FromMonth │ │ │ ├── Int16.April.cs │ │ │ ├── Int16.August.cs │ │ │ ├── Int16.December.cs │ │ │ ├── Int16.February.cs │ │ │ ├── Int16.January.cs │ │ │ ├── Int16.July.cs │ │ │ ├── Int16.June.cs │ │ │ ├── Int16.March.cs │ │ │ ├── Int16.May.cs │ │ │ ├── Int16.November.cs │ │ │ ├── Int16.October.cs │ │ │ └── Int16.September.cs │ │ ├── Int16.DaysInMonth.cs │ │ └── Int16.IsLeapYear.cs │ └── System.TimeSpan │ │ ├── Int16.ToDays.cs │ │ ├── Int16.ToHours.cs │ │ ├── Int16.ToMilliseconds.cs │ │ ├── Int16.ToMinutes.cs │ │ └── Int16.ToSeconds.cs │ ├── System.Int32 │ ├── Int32.FactorOf.cs │ ├── Int32.IsEven.cs │ ├── Int32.IsMultipleOf.cs │ ├── Int32.IsOdd.cs │ ├── Int32.PercentOf.cs │ ├── Int32.PercentageOf.cs │ ├── Int32.RangeTo.cs │ ├── Int32.Sum.cs │ ├── System.DateTime │ │ ├── FromMonth │ │ │ ├── Int32.April.cs │ │ │ ├── Int32.August.cs │ │ │ ├── Int32.December.cs │ │ │ ├── Int32.February.cs │ │ │ ├── Int32.January.cs │ │ │ ├── Int32.July.cs │ │ │ ├── Int32.June.cs │ │ │ ├── Int32.March.cs │ │ │ ├── Int32.May.cs │ │ │ ├── Int32.November.cs │ │ │ ├── Int32.October.cs │ │ │ └── Int32.September.cs │ │ ├── Int32.DaysInMonth.cs │ │ └── Int32.IsLeapYear.cs │ └── System.TimeSpan │ │ ├── Int32.ToDays.cs │ │ ├── Int32.ToHours.cs │ │ ├── Int32.ToMilliseconds.cs │ │ ├── Int32.ToMinutes.cs │ │ └── Int32.ToSeconds.cs │ ├── System.Int64 │ ├── Int64.FactorOf.cs │ ├── Int64.IsEven.cs │ ├── Int64.IsMultipleOf.cs │ ├── Int64.IsOdd.cs │ ├── Int64.PercentOf.cs │ ├── Int64.PercentageOf.cs │ ├── Int64.RangeTo.cs │ ├── Int64.Sum.cs │ └── System.TimeSpan │ │ ├── Int64.ToDays.cs │ │ ├── Int64.ToHours.cs │ │ ├── Int64.ToMilliseconds.cs │ │ ├── Int64.ToMinutes.cs │ │ └── Int64.ToSeconds.cs │ ├── System.Lazy[T] │ └── Layz[T].DisposeIfIsValueCreated.cs │ ├── System.Linq.Expressions.Expression │ └── Expression.TryGetMemberExpression.cs │ ├── System.Linq.Expressions.Expression[TDelegate] │ ├── Expression[TDelegate].GetMemberInfoFromExpression.cs │ └── Expression[TDelegate].GetMemberPath.cs │ ├── System.Object │ ├── Convert │ │ ├── Object.ToBoolean.cs │ │ ├── Object.ToByte.cs │ │ ├── Object.ToChar.cs │ │ ├── Object.ToDateTime.cs │ │ ├── Object.ToDecimal.cs │ │ ├── Object.ToDouble.cs │ │ ├── Object.ToInt16.cs │ │ ├── Object.ToInt32.cs │ │ └── Object.ToInt64.cs │ ├── Generic │ │ ├── Object.Generic.Chain.cs │ │ ├── Object.Generic.Coalesce.cs │ │ ├── Object.Generic.CoalesceOrDefault.cs │ │ ├── Object.Generic.ExecuteSafe.cs │ │ ├── Object.Generic.GetName.cs │ │ ├── Object.Generic.GetNameChain.cs │ │ ├── Object.Generic.IfNull.cs │ │ ├── Object.Generic.IsDefault.cs │ │ ├── Object.Generic.IsIn.cs │ │ ├── Object.Generic.IsNotIn.cs │ │ ├── Object.Generic.Maximum.cs │ │ ├── Object.Generic.Minimum.cs │ │ ├── Object.Generic.Satisfies.cs │ │ ├── Object.Generic.SatisfiesWithMessages.cs │ │ ├── Object.Generic.Specification.cs │ │ ├── Object.Generic.Swap.cs │ │ ├── Object.Generic.ThrowIfNull.cs │ │ └── Object.Generic.ToSingleItemArray.cs │ ├── Object.As.cs │ ├── Object.IsNotNull.cs │ ├── Object.IsNull.cs │ └── Object.ReferenceEquals.cs │ ├── System.Random │ ├── Random.CoinToss.cs │ └── Random.OneOf.cs │ ├── System.Reflection.PropertyInfo │ ├── PropertyInfo.GetValueWithoutIndex.cs │ └── PropertyInfo.ToMemberInformation.cs │ ├── System.String │ ├── Convert │ │ ├── String.ToBoolean.cs │ │ ├── String.ToByte.cs │ │ ├── String.ToChar.cs │ │ ├── String.ToDateTime.cs │ │ ├── String.ToDecimal.cs │ │ ├── String.ToDouble.cs │ │ ├── String.ToGuid.cs │ │ ├── String.ToInt16.cs │ │ ├── String.ToInt32.cs │ │ └── String.ToInt64.cs │ ├── ConvertSafe │ │ ├── String.SafeToBoolean.cs │ │ ├── String.SafeToByte.cs │ │ ├── String.SafeToChar.cs │ │ ├── String.SafeToDateTime.cs │ │ ├── String.SafeToDecimal.cs │ │ ├── String.SafeToDouble.cs │ │ ├── String.SafeToGuid.cs │ │ ├── String.SafeToInt16.cs │ │ ├── String.SafeToInt32.cs │ │ └── String.SafeToInt64.cs │ ├── ExtractNumbers │ │ ├── String.ExtractAllDecimal.cs │ │ ├── String.ExtractAllDouble.cs │ │ ├── String.ExtractAllInt16.cs │ │ ├── String.ExtractAllInt32.cs │ │ ├── String.ExtractAllInt64.cs │ │ ├── String.ExtractFirstDecimal.cs │ │ ├── String.ExtractFirstDouble.cs │ │ ├── String.ExtractFirstInt16.cs │ │ ├── String.ExtractFirstInt32.cs │ │ ├── String.ExtractFirstInt64.cs │ │ ├── String.Private.ExtractAllFloatingNumbers.cs │ │ ├── String.Private.ExtractAllNumbers.cs │ │ ├── String.Private.ExtractFloatingNumber.cs │ │ └── String.Private.ExtractNumber.cs │ ├── Pars │ │ ├── String.TryParsBoolean.cs │ │ ├── String.TryParsByte.cs │ │ ├── String.TryParsChar.cs │ │ ├── String.TryParsDateTime.cs │ │ ├── String.TryParsDateTimeExact.cs │ │ ├── String.TryParsDecimal.cs │ │ ├── String.TryParsDouble.cs │ │ ├── String.TryParsGuid.cs │ │ ├── String.TryParsInt16.cs │ │ ├── String.TryParsInt32.cs │ │ └── String.TryParsInt64.cs │ ├── String.AppendWithNewLineIfNotEmpty.cs │ ├── String.ChangeType.cs │ ├── String.CharAt.cs │ ├── String.CompareOrdinal.cs │ ├── String.CompareOrdinalIgnoreCase.cs │ ├── String.ConcatAll.cs │ ├── String.Contains.cs │ ├── String.ContainsAll.cs │ ├── String.ContainsAny.cs │ ├── String.Extract.cs │ ├── String.ExtractLetters.cs │ ├── String.ExtractNumbers.cs │ ├── String.F.cs │ ├── String.FormatFileExtension.cs │ ├── String.GetAfter.cs │ ├── String.GetBefore.cs │ ├── String.GetBetween.cs │ ├── String.GetLines.cs │ ├── String.IfNotEmpty.cs │ ├── String.IsAlpha.cs │ ├── String.IsAlphaNumeric.cs │ ├── String.IsEmpty.cs │ ├── String.IsNotEmpty.cs │ ├── String.IsNumeric.cs │ ├── String.Join.cs │ ├── String.KeepLetters.cs │ ├── String.KeepLettersAndNumbers.cs │ ├── String.KeepNumbers.cs │ ├── String.KeepWhere.cs │ ├── String.Left.cs │ ├── String.RemoveLetters.cs │ ├── String.RemoveLettersAndNumbers.cs │ ├── String.RemoveNumbers.cs │ ├── String.RemoveWhere.cs │ ├── String.Repeat.cs │ ├── String.ReplaceAt.cs │ ├── String.ReplaceByEmpty.cs │ ├── String.Reverse.cs │ ├── String.Right.cs │ ├── String.SafeToCultureInfo.cs │ ├── String.Split.cs │ ├── String.SplitLines.cs │ ├── String.SubstringLeft.cs │ ├── String.SubstringLeftSafe.cs │ ├── String.SubstringRight.cs │ ├── String.SubstringRightSafe.cs │ ├── String.TakeAndRemove.cs │ ├── String.ToCultureInfo.cs │ ├── String.ToEnum.cs │ ├── String.Truncate.cs │ ├── String.TryToEnum.cs │ ├── String.WildcardToRegex.cs │ ├── System.IO.Path │ │ └── String.GetFileExtension.cs │ └── System.Text.RegularExpressions.Regex │ │ ├── String.IsMatch.cs │ │ ├── String.IsNotMatch.cs │ │ ├── String.Match.cs │ │ └── String.Matches.cs │ ├── System.Text.StringBuilder │ └── StringBuilder.AppendLineFormat.cs │ ├── System.TimeSpan │ ├── TimeSpan.Future.cs │ └── TimeSpan.Past.cs │ ├── System.Type │ ├── Type.GetAttributeDefinitions.cs │ ├── Type.GetDeclaringAssembly.cs │ ├── Type.GetGenericTypeArgument.cs │ ├── Type.GetGenericTypeArguments.cs │ ├── Type.GetImplementedInterfaces.cs │ ├── Type.GetNameWithNamespace.cs │ ├── Type.GetPublicProperties.cs │ ├── Type.GetPublicSettableProperties.cs │ ├── Type.GetTypeFromNullable.cs │ ├── Type.ImplementsICollectionT.cs │ ├── Type.IsEnum.cs │ ├── Type.IsGenericType.cs │ ├── Type.IsICollectionT.cs │ ├── Type.IsIEnumerableT.cs │ ├── Type.IsIListT.cs │ └── Type.IsMicrosoftType.cs │ └── Utilities │ ├── Compare │ └── KeyEqualityComparer.cs │ ├── ExpressionEvaluator │ └── ExpressionEvaluator.cs │ ├── InstanceBuilder │ ├── Creator │ │ └── InstanceCreator.cs │ ├── Exception │ │ └── CreateInstanceException.cs │ ├── Extension │ │ └── MemberSelectionResultEx.cs │ ├── Factory │ │ ├── Base │ │ │ └── InstanceFactoryBase.cs │ │ ├── Definition │ │ │ └── IInstanceFactory.cs │ │ ├── ExpressionInstanceFactory.cs │ │ └── Provider │ │ │ └── InstanceFactoryProvider.cs │ ├── FluentInterface │ │ ├── CreateInstanceOptions.cs │ │ └── Definition │ │ │ ├── ICreateInstanceOptions.cs │ │ │ ├── ICreateInstanceOptionsComplete.cs │ │ │ ├── IFactoryOptionsConstistent.cs │ │ │ ├── IFactoryOptionsInconsistent.cs │ │ │ └── IIncludeExcludeOptions.cs │ ├── MemberInformation │ │ ├── Definition │ │ │ └── IMemberInformation.cs │ │ └── MemberInformation.cs │ └── MemberSelection │ │ ├── Definition │ │ ├── IMemberSelectionRule.cs │ │ └── IMemberSelectionRuleInspector.cs │ │ ├── Enum │ │ ├── CompareMode.cs │ │ ├── MemberSelectionMode.cs │ │ ├── MemberSelectionResult.cs │ │ └── MemberSelectionRuleTarget.cs │ │ ├── Inspector │ │ └── MemberSelectionRuleInspector.cs │ │ ├── Provider │ │ └── MemberSelectionRuleProvider.cs │ │ └── Rules │ │ ├── AllMemberSelectionRule.cs │ │ ├── Base │ │ └── MemberSelectionRuleBase.cs │ │ ├── ExpressionMemberSelectionRule.cs │ │ ├── PathMemberSelectionRule.cs │ │ └── TypeMemberSelectionRule.cs │ ├── Specification │ ├── AndSpecification.cs │ ├── ExpressionSpecification.cs │ ├── ISpecification.cs │ ├── OperatorSpecification.cs │ ├── OrSpecification.cs │ ├── Specification.cs │ └── XOrSpecification.cs │ ├── StringTemplate │ ├── Model │ │ └── FormatInformation.cs │ ├── StringTemplate.cs │ └── ValueProvider │ │ ├── IValueProvider.cs │ │ ├── LookuptValueProvider.cs │ │ ├── ObjectValueProvider.cs │ │ └── ValueProviderBase.cs │ ├── Tree │ ├── Definition │ │ ├── ITreeNode.cs │ │ ├── ITreeNodeAware.cs │ │ ├── ITreeNodeCollection.cs │ │ └── TreeTraversalDirection.cs │ ├── TreeNode.cs │ └── TreeNodeCollection.cs │ └── Utilities.RandomValueEx.cs ├── .build └── Build.ps1 ├── .gitattributes ├── .gitignore ├── .tools ├── 7zip │ └── 7za.exe ├── Cake │ ├── Autofac.dll │ ├── Cake.Common.dll │ ├── Cake.Common.xml │ ├── Cake.Core.dll │ ├── Cake.Core.xml │ ├── Cake.NuGet.dll │ ├── Cake.NuGet.xml │ ├── Cake.exe │ ├── Cake.exe.config │ ├── Cake.nuspec │ ├── Cake.runtimeconfig.json │ ├── Cake.xml │ ├── LICENSE │ ├── Microsoft.CodeAnalysis.CSharp.Scripting.dll │ ├── Microsoft.CodeAnalysis.CSharp.dll │ ├── Microsoft.CodeAnalysis.Scripting.dll │ ├── Microsoft.CodeAnalysis.dll │ ├── Microsoft.Web.XmlTransform.dll │ ├── Newtonsoft.Json.dll │ ├── NuGet.Commands.dll │ ├── NuGet.Common.dll │ ├── NuGet.Configuration.dll │ ├── NuGet.DependencyResolver.Core.dll │ ├── NuGet.Frameworks.dll │ ├── NuGet.LibraryModel.dll │ ├── NuGet.PackageManagement.dll │ ├── NuGet.Packaging.Core.dll │ ├── NuGet.Packaging.dll │ ├── NuGet.ProjectModel.dll │ ├── NuGet.Protocol.dll │ ├── NuGet.Resolver.dll │ ├── NuGet.Versioning.dll │ ├── System.AppContext.dll │ ├── System.Collections.Immutable.dll │ ├── System.Console.dll │ ├── System.Diagnostics.FileVersionInfo.dll │ ├── System.Diagnostics.StackTrace.dll │ ├── System.IO.Compression.dll │ ├── System.IO.FileSystem.Primitives.dll │ ├── System.IO.FileSystem.dll │ ├── System.Reflection.Metadata.dll │ ├── System.Security.Cryptography.Algorithms.dll │ ├── System.Security.Cryptography.Encoding.dll │ ├── System.Security.Cryptography.Primitives.dll │ ├── System.Security.Cryptography.X509Certificates.dll │ ├── System.Text.Encoding.CodePages.dll │ ├── System.Threading.Thread.dll │ ├── System.ValueTuple.dll │ ├── System.Xml.ReaderWriter.dll │ ├── System.Xml.XPath.XDocument.dll │ ├── System.Xml.XPath.dll │ └── System.Xml.XmlDocument.dll ├── Curl │ └── curl.exe ├── NuGet │ └── nuget.exe └── r#Settings.DotSettings ├── License.txt ├── README.md └── appveyor.yml /.Art/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.Art/logo.png -------------------------------------------------------------------------------- /.Art/logo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.Art/logo.psd -------------------------------------------------------------------------------- /.Doc/docfx_project/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /.Doc/docfx_project/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | -------------------------------------------------------------------------------- /.Doc/docfx_project/api/index.md: -------------------------------------------------------------------------------- 1 | # Extend Api Documentation -------------------------------------------------------------------------------- /.Doc/docfx_project/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.Doc/docfx_project/images/logo.png -------------------------------------------------------------------------------- /.Doc/docfx_project/index.md: -------------------------------------------------------------------------------- 1 | # Welcome to Extend 2 | 3 | ### What is this? 4 | 5 | Extend is a set of .Net extension methods build as portable class library. 6 | Extend enhance the .Net framework by adding a bunch of methods to increase developer’s productivity. 7 | Currently it contains 377 unique extension methods (623 overloads included). 8 | ### Where can I use it? 9 | You can use it in every .Net application or library targeting one of the following profiles: 10 | * .Net 4.5 11 | * Windows 8 12 | * Windows Phone 8 13 | * Windows Phone 8.1 14 | 15 | ### How do I use it? 16 | 1. Install ["Extend"](http://www.nuget.org/packages/Extend/) via [NuGet](http://nuget.org) 17 | __Install-Package PortableExtensions__ 18 | 2. Add using for Extend ```using Extend; ``` 19 | 3. Done! -------------------------------------------------------------------------------- /.Doc/docfx_project/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Api Documentation 2 | href: api/ 3 | homepage: api/Extend.yml 4 | -------------------------------------------------------------------------------- /.Src/Extend.Testing/Models/IndexedItemTest.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public class IndexedItemTest 12 | { 13 | [Fact] 14 | public void CtorTest() 15 | { 16 | var index = RandomValueEx.GetRandomInt32(); 17 | var value = RandomValueEx.GetRandomString(); 18 | var target = new IndexedItem( index, value ); 19 | 20 | target.Index.Should() 21 | .Be( index ); 22 | target.Item.Should() 23 | .Be( value ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Array/System.Array.Generic/Array.Generic.Clear.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class ArrayExTest 11 | { 12 | [Fact] 13 | public void GenericClearTest() 14 | { 15 | var array = new[] 16 | { 17 | "test", 18 | "test" 19 | }; 20 | array.Clear( 0, 2 ); 21 | 22 | Assert.Null( array[0] ); 23 | Assert.Null( array[1] ); 24 | } 25 | 26 | [Fact] 27 | public void GenericClearTest1() 28 | { 29 | // ReSharper disable once AssignNullToNotNullAttribute 30 | Action test = () => ArrayEx.Clear( null, 0, 2 ); 31 | Assert.Throws( test ); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Array/System.Array.Generic/Array.Generic.ClearAll.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class ArrayExTest 11 | { 12 | [Fact] 13 | public void GenericClearAllTest() 14 | { 15 | var array = new[] 16 | { 17 | "test", 18 | "test" 19 | }; 20 | array.ClearAll(); 21 | 22 | Assert.Null( array[0] ); 23 | Assert.Null( array[1] ); 24 | } 25 | 26 | [Fact] 27 | public void GenericClearAllTest1() 28 | { 29 | String[] array = null; 30 | // ReSharper disable once AssignNullToNotNullAttribute 31 | Action test = () => array.ClearAll(); 32 | 33 | Assert.Throws( test ); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Array/System.Array.Generic/Array.Generic.Resize.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class ArrayExTest 11 | { 12 | [Fact] 13 | public void GenericResizeTest() 14 | { 15 | var array = new[] 16 | { 17 | "test", 18 | "test2" 19 | }; 20 | array = array.Resize( 10 ); 21 | Assert.Equal( 10, array.Length ); 22 | } 23 | 24 | [Fact] 25 | public void GenericResizeTestNullCheck() 26 | { 27 | String[] array = null; 28 | // ReSharper disable once AssignNullToNotNullAttribute 29 | Action test = () => array.Resize( 10 ); 30 | 31 | Assert.Throws( test ); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Boolean/Boolean.Select.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class BooleanExTest 11 | { 12 | [Fact] 13 | public void SelectValueTest() 14 | { 15 | const String trueValue = "true"; 16 | const String falseValue = "false"; 17 | 18 | var actual = false.SelectValue( trueValue, falseValue ); 19 | Assert.Equal( falseValue, actual ); 20 | 21 | actual = true.SelectValue( trueValue, falseValue ); 22 | Assert.Equal( trueValue, actual ); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsDigit.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using FluentAssertions; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class CharExTest 11 | { 12 | [Fact] 13 | public void IsDigitTest() 14 | { 15 | '0'.IsDigit() 16 | .Should() 17 | .BeTrue(); 18 | '9'.IsDigit() 19 | .Should() 20 | .BeTrue(); 21 | 22 | 'a'.IsDigit() 23 | .Should() 24 | .BeFalse(); 25 | 'A'.IsDigit() 26 | .Should() 27 | .BeFalse(); 28 | 'z'.IsDigit() 29 | .Should() 30 | .BeFalse(); 31 | '-'.IsDigit() 32 | .Should() 33 | .BeFalse(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsLetter.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System.Linq; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class CharExTest 11 | { 12 | [Fact] 13 | public void IsLetterTest() 14 | { 15 | var range = 0.RangeTo( 9 ); 16 | foreach ( var c in range.Select( x => x.ToChar() ) ) 17 | Assert.False( c.IsLetter() ); 18 | 19 | Assert.True( 'a'.IsLetter() ); 20 | Assert.True( 'A'.IsLetter() ); 21 | Assert.True( 'z'.IsLetter() ); 22 | Assert.False( '-'.IsLetter() ); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsLetterOrDigit.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using FluentAssertions; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class CharExTest 11 | { 12 | [Fact] 13 | public void IsLetterOrDigitTest() 14 | { 15 | '0'.IsLetterOrDigit() 16 | .Should() 17 | .BeTrue(); 18 | '9'.IsLetterOrDigit() 19 | .Should() 20 | .BeTrue(); 21 | 22 | 'a'.IsLetterOrDigit() 23 | .Should() 24 | .BeTrue(); 25 | 'A'.IsLetterOrDigit() 26 | .Should() 27 | .BeTrue(); 28 | 'z'.IsLetterOrDigit() 29 | .Should() 30 | .BeTrue(); 31 | '-'.IsLetterOrDigit() 32 | .Should() 33 | .BeFalse(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsLower.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class CharExTest 10 | { 11 | [Fact] 12 | public void IsLowerTest() 13 | { 14 | Assert.True( 'a'.IsLower() ); 15 | Assert.False( 'A'.IsLower() ); 16 | Assert.False( '1'.IsLower() ); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsNumber.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using FluentAssertions; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class CharExTest 11 | { 12 | [Fact] 13 | public void IsNumberTest() 14 | { 15 | '0'.IsNumber() 16 | .Should() 17 | .BeTrue(); 18 | '9'.IsNumber() 19 | .Should() 20 | .BeTrue(); 21 | 22 | 'a'.IsNumber() 23 | .Should() 24 | .BeFalse(); 25 | 'A'.IsNumber() 26 | .Should() 27 | .BeFalse(); 28 | 'z'.IsNumber() 29 | .Should() 30 | .BeFalse(); 31 | '-'.IsNumber() 32 | .Should() 33 | .BeFalse(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsUpper.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class CharExTest 10 | { 11 | [Fact] 12 | public void IsUpperTest() 13 | { 14 | Assert.False( 'a'.IsUpper() ); 15 | Assert.True( 'A'.IsUpper() ); 16 | Assert.False( '1'.IsUpper() ); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.IsWhiteSpace.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class CharExTest 10 | { 11 | [Fact] 12 | public void IsWhiteSpaceTest() 13 | { 14 | Assert.False( 'a'.IsWhiteSpace() ); 15 | Assert.False( 'A'.IsWhiteSpace() ); 16 | Assert.False( 'z'.IsWhiteSpace() ); 17 | Assert.False( '-'.IsWhiteSpace() ); 18 | Assert.True( ' '.IsWhiteSpace() ); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.Repeat.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class CharExTest 10 | { 11 | [Fact] 12 | public void RepeatTest() 13 | { 14 | var actual = 'a'.Repeat( 3 ); 15 | Assert.Equal( "aaa", actual ); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.ToLower.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class CharExTest 10 | { 11 | [Fact] 12 | public void ToLowerTest() 13 | { 14 | Assert.Equal( 'a', 'A'.ToLower() ); 15 | Assert.Equal( 'a', 'a'.ToLower() ); 16 | Assert.Equal( '1', '1'.ToLower() ); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Char/Char.ToUpper.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class CharExTest 10 | { 11 | [Fact] 12 | public void ToUpperTest() 13 | { 14 | Assert.Equal( 'A', 'A'.ToUpper() ); 15 | Assert.Equal( 'A', 'a'.ToUpper() ); 16 | Assert.Equal( '1', '1'.ToUpper() ); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Collections.Generic.IEnumerable[T]/IEnumerable[T].IsNullOrEmpty.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | // ReSharper disable once InconsistentNaming 12 | public partial class IEnumerableTExTest 13 | { 14 | [Fact] 15 | public void IsNullOrEmptyTest() 16 | { 17 | List list = null; 18 | Assert.True( list.IsNullOrEmpty() ); 19 | 20 | list = new List(); 21 | Assert.True( list.IsNullOrEmpty() ); 22 | 23 | list.Add( RandomValueEx.GetRandomString() ); 24 | Assert.False( list.IsNullOrEmpty() ); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.Elapsed.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void ElapsedTest() 14 | { 15 | var dateTime = new DateTime( 1980, 1, 1 ); 16 | var expected = DateTime.Now - dateTime; 17 | var actual = dateTime.Elapsed(); 18 | 19 | // remove milliseconds 20 | expected = new TimeSpan( expected.Days, expected.Hours, expected.Minutes, expected.Seconds ); 21 | actual = new TimeSpan( actual.Days, actual.Hours, actual.Minutes, actual.Seconds ); 22 | Assert.Equal( expected, actual ); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.EndOfDay.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void EndOfDayTest() 14 | { 15 | var dateTime = DateTime.Now; 16 | var expected = 17 | new DateTime( dateTime.Year, dateTime.Month, dateTime.Day ).AddDays( 1 ) 18 | .Subtract( 1.ToMilliseconds() ); 19 | var actual = dateTime.EndOfDay(); 20 | Assert.Equal( expected, actual ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.EndOfMonth.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void EndOfMonthTest() 14 | { 15 | var dateTime = DateTime.Now; 16 | var expected = new DateTime( dateTime.Year, dateTime.Month, 1 ).AddMonths( 1 ) 17 | .Subtract( 1.ToMilliseconds() ); 18 | var actual = dateTime.EndOfMonth(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.FirstDayOfWeek.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void FirstDayOfWeekTest() 14 | { 15 | var dateTime = RandomValueEx.GetRandomDateTime(); 16 | var expected = 17 | new DateTime( dateTime.Year, dateTime.Month, dateTime.Day ).AddDays( -(Int32) dateTime.DayOfWeek ); 18 | var actual = dateTime.FirstDayOfWeek(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsAfternoon.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsAfternoonTest() 14 | { 15 | var dateTime = new DateTime( 2014, 10, 10, 13, 0, 0 ); 16 | var actual = dateTime.IsAfternoon(); 17 | Assert.True( actual ); 18 | 19 | dateTime = new DateTime( 2014, 10, 10, 10, 0, 0 ); 20 | actual = dateTime.IsAfternoon(); 21 | Assert.False( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsFuture.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsFutureTest() 14 | { 15 | var dateTime = DateTime.Now.Subtract( 1.ToMilliseconds() ); 16 | var actual = dateTime.IsFuture(); 17 | Assert.False( actual ); 18 | 19 | dateTime = DateTime.Now.AddDays( 2 ); 20 | actual = dateTime.IsFuture(); 21 | Assert.True( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsMorning.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsMorningTest() 14 | { 15 | var dateTime = new DateTime( 2014, 10, 10, 13, 0, 0 ); 16 | var actual = dateTime.IsMorning(); 17 | Assert.False( actual ); 18 | 19 | dateTime = new DateTime( 2014, 10, 10, 10, 0, 0 ); 20 | actual = dateTime.IsMorning(); 21 | Assert.True( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsPast.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsPastTest() 14 | { 15 | var dateTime = DateTime.Now.Subtract( 1.ToMilliseconds() ); 16 | var actual = dateTime.IsPast(); 17 | Assert.True( actual ); 18 | 19 | dateTime = DateTime.Now.AddDays( 2 ); 20 | actual = dateTime.IsPast(); 21 | Assert.False( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsTimeEquals.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsTimeEqualTest() 14 | { 15 | var dateTime = DateTime.Now; 16 | var dateTime1 = dateTime.AddDays( -2 ); 17 | 18 | var actual = dateTime.IsTimeEquals( dateTime1 ); 19 | Assert.True( actual ); 20 | 21 | dateTime1 = dateTime.AddDays( -2 ) 22 | .AddHours( 1 ); 23 | 24 | actual = dateTime.IsTimeEquals( dateTime1 ); 25 | Assert.False( actual ); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsToday.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsTodayTest() 14 | { 15 | var dateTime = DateTime.Now; 16 | var actual = dateTime.IsToday(); 17 | Assert.True( actual ); 18 | 19 | dateTime = DateTime.Now.AddDays( 2 ); 20 | actual = dateTime.IsToday(); 21 | Assert.False( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsWeekDay.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsWeekdDayTest() 14 | { 15 | var dateTime = new DateTime( 2014, 3, 27 ); 16 | var actual = dateTime.IsWeekdDay(); 17 | Assert.True( actual ); 18 | 19 | dateTime = new DateTime( 2014, 3, 29 ); 20 | actual = dateTime.IsWeekdDay(); 21 | Assert.False( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.IsWeekendDay.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void IsWeekendDayTest() 14 | { 15 | var dateTime = new DateTime( 2014, 3, 27 ); 16 | var actual = dateTime.IsWeekendDay(); 17 | Assert.False( actual ); 18 | 19 | dateTime = new DateTime( 2014, 3, 29 ); 20 | actual = dateTime.IsWeekendDay(); 21 | Assert.True( actual ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.LastDayOfWeek.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void LastDayOfWeekTest() 14 | { 15 | var dateTime = new DateTime( 2014, 3, 30 ); 16 | var actual = dateTime.LastDayOfWeek(); 17 | 18 | Assert.Equal( dateTime, actual ); 19 | 20 | dateTime = new DateTime( 2014, 3, 28 ); 21 | actual = dateTime.LastDayOfWeek(); 22 | 23 | Assert.Equal( new DateTime( 2014, 3, 30 ), actual ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.NextWeekDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void NextWeekDayTest() 14 | { 15 | var friday = new DateTime( 2014, 8, 8 ); 16 | var saturday = new DateTime( 2014, 8, 9 ); 17 | var sunday = new DateTime( 2014, 8, 10 ); 18 | 19 | var actual = friday.NextWeekDay(); 20 | Assert.Equal( friday, actual ); 21 | 22 | actual = saturday.NextWeekDay(); 23 | Assert.Equal( new DateTime( 2014, 8, 11 ), actual ); 24 | 25 | actual = sunday.NextWeekDay(); 26 | Assert.Equal( new DateTime( 2014, 8, 11 ), actual ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.StartOfDay.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void StartOfDaykTest() 14 | { 15 | var dateTime = new DateTime( 2014, 3, 30, 12, 0, 2 ); 16 | var actual = dateTime.StartOfDay(); 17 | 18 | Assert.Equal( new DateTime( 2014, 3, 30 ), actual ); 19 | 20 | dateTime = new DateTime( 2014, 3, 28, 5, 12, 2 ); 21 | actual = dateTime.StartOfDay(); 22 | 23 | Assert.Equal( new DateTime( 2014, 3, 28 ), actual ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.StartOfMonth.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void StartOfMonthTest() 14 | { 15 | var dateTime = DateTime.Today; 16 | var expected = new DateTime( dateTime.Year, dateTime.Month, 1 ); 17 | var actual = dateTime.StartOfMonth(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.StartOfYear.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void StartOfYearTest() 14 | { 15 | var dateTime = DateTime.Today; 16 | var expected = new DateTime( dateTime.Year, 1, 1 ); 17 | var actual = dateTime.StartOfYear(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.Tomorrow.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void TomorrowTest() 14 | { 15 | var dateTime = DateTime.Today; 16 | var expected = dateTime.AddDays( 1 ); 17 | var actual = dateTime.Tomorrow(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.DateTime/DateTime.Yesterday.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DateTimeExTest 11 | { 12 | [Fact] 13 | public void YesterdayTest() 14 | { 15 | var dateTime = DateTime.Today; 16 | var expected = dateTime.AddDays( -1 ); 17 | var actual = dateTime.Yesterday(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/Double.IsInfinit.yTest.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void IsInfinityTest() 14 | { 15 | var number = 10.5; 16 | var actual = number.IsInfinity(); 17 | 18 | Assert.False( actual ); 19 | 20 | number = Double.NegativeInfinity; 21 | actual = number.IsInfinity(); 22 | 23 | Assert.True( actual ); 24 | 25 | number = Double.PositiveInfinity; 26 | actual = number.IsInfinity(); 27 | 28 | Assert.True( actual ); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/Double.IsNaN.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void IsNaNTest() 14 | { 15 | var number = 10.5; 16 | var actual = number.IsNaN(); 17 | 18 | Assert.False( actual ); 19 | 20 | number = Double.NaN; 21 | actual = number.IsNaN(); 22 | 23 | Assert.True( actual ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/Double.IsNegativeInfinit.yTest.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void IsNegativeInfinityTest() 14 | { 15 | var number = 10.5; 16 | var actual = number.IsNegativeInfinity(); 17 | 18 | Assert.False( actual ); 19 | 20 | number = Double.NegativeInfinity; 21 | actual = number.IsNegativeInfinity(); 22 | 23 | Assert.True( actual ); 24 | 25 | number = Double.PositiveInfinity; 26 | actual = number.IsNegativeInfinity(); 27 | 28 | Assert.False( actual ); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/Double.IsPositiveInfinit.yTest.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void IsPositiveInfinityTest() 14 | { 15 | var number = 10.5; 16 | var actual = number.IsPositiveInfinity(); 17 | 18 | Assert.False( actual ); 19 | 20 | number = Double.NegativeInfinity; 21 | actual = number.IsPositiveInfinity(); 22 | 23 | Assert.False( actual ); 24 | 25 | number = Double.PositiveInfinity; 26 | actual = number.IsPositiveInfinity(); 27 | 28 | Assert.True( actual ); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/System.TimeSpan/Double.ToDays.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void ToDaysTest() 14 | { 15 | const Double number = 10.5; 16 | var expected = TimeSpan.FromDays( number ); 17 | var actual = number.ToDays(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/System.TimeSpan/Double.ToHours.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void ToHoursTest() 14 | { 15 | const Double number = 10.5; 16 | var expected = TimeSpan.FromHours( number ); 17 | var actual = number.ToHours(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/System.TimeSpan/Double.ToMilliseconds.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void ToMillisecondsTest() 14 | { 15 | const Double number = 10.5; 16 | var expected = TimeSpan.FromMilliseconds( number ); 17 | var actual = number.ToMilliseconds(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/System.TimeSpan/Double.ToMinutes.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void ToMinutesTest() 14 | { 15 | const Double number = 10.5; 16 | var expected = TimeSpan.FromMinutes( number ); 17 | var actual = number.ToMinutes(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Double/System.TimeSpan/Double.ToSeconds.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class DoubleExTest 11 | { 12 | [Fact] 13 | public void ToSecondsTest() 14 | { 15 | const Double number = 10.5; 16 | var expected = TimeSpan.FromSeconds( number ); 17 | var actual = number.ToSeconds(); 18 | 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Enum/Enum.GetFlags.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text.RegularExpressions; 6 | using FluentAssertions; 7 | using Xunit; 8 | 9 | #endregion 10 | 11 | namespace Extend.Testing 12 | { 13 | public partial class EnumExTest 14 | { 15 | [Fact] 16 | public void GetFlagsTest() 17 | { 18 | const RegexOptions enumValue = RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.None; 19 | var actual = enumValue 20 | .GetFlags() 21 | .ToList(); 22 | 23 | actual.Should() 24 | .HaveCount( 4 ); 25 | actual.Should() 26 | .Contain( new List { RegexOptions.Compiled, RegexOptions.CultureInvariant, RegexOptions.Multiline, RegexOptions.None } ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/Int16.IsEven.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int16ExTest 10 | { 11 | [Fact] 12 | public void IsEvenTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt16(); 15 | 16 | var expected = value % 2 == 0; 17 | var actual = value.IsEven(); 18 | Assert.Equal( expected, actual ); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/Int16.IsMultipleOf.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int16ExTest 10 | { 11 | [Fact] 12 | public void IsMultipleOfTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt16(); 15 | var factor = RandomValueEx.GetRandomInt16(); 16 | 17 | var expected = value % factor == 0; 18 | var actual = value.IsMultipleOf( factor ); 19 | Assert.Equal( expected, actual ); 20 | 21 | value = 10; 22 | factor = 2; 23 | 24 | actual = value.IsMultipleOf( factor ); 25 | Assert.True( actual ); 26 | 27 | value = 10; 28 | factor = 3; 29 | 30 | actual = value.IsMultipleOf( factor ); 31 | Assert.False( actual ); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/Int16.IsOdd.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int16ExTest 10 | { 11 | [Fact] 12 | public void IsOddTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt16(); 15 | 16 | var expected = value % 2 != 0; 17 | var actual = value.IsOdd(); 18 | Assert.Equal( expected, actual ); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/Int16.DaysInMonth.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void DaysInMonthTest() 14 | { 15 | var year = RandomValueEx.GetRandomInt32( 1990, 2015 ); 16 | var month = RandomValueEx.GetRandomInt32( 1, 12 ); 17 | 18 | var expected = DateTime.DaysInMonth( year, month ); 19 | var actual = ( (Int16) year ).DaysInMonth( (Int16) month ); 20 | Assert.Equal( expected, actual ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/Int16.IsLeapYear.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void IsLeapYearTest() 14 | { 15 | var year = RandomValueEx.GetRandomInt32( 1990, 2015 ); 16 | 17 | var expected = DateTime.IsLeapYear( year ); 18 | var actual = ( (Int16) year ).IsLeapYear(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.April.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void AprilTest() 14 | { 15 | var expected = new DateTime( 2000, 4, 10 ); 16 | var actual = Int16Ex.April( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.August.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void AugustTest() 14 | { 15 | var expected = new DateTime( 2000, 8, 10 ); 16 | var actual = Int16Ex.August( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.December.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void DecemberTest() 14 | { 15 | var expected = new DateTime( 2000, 12, 10 ); 16 | var actual = Int16Ex.December( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.February.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void FebruaryTest() 14 | { 15 | var expected = new DateTime( 2000, 2, 10 ); 16 | var actual = Int16Ex.February( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.January.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void JanuaryTest() 14 | { 15 | var expected = new DateTime( 2000, 1, 10 ); 16 | var actual = Int16Ex.January( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.July.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void JulyTest() 14 | { 15 | var expected = new DateTime( 2000, 7, 10 ); 16 | var actual = Int16Ex.July( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.June.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void JuneTest() 14 | { 15 | var expected = new DateTime( 2000, 6, 10 ); 16 | var actual = Int16Ex.June( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.March.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void MarchTest() 14 | { 15 | var expected = new DateTime( 2000, 3, 10 ); 16 | var actual = Int16Ex.March( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.May.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void MayTest() 14 | { 15 | var expected = new DateTime( 2000, 5, 10 ); 16 | var actual = Int16Ex.May( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.November.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void NovemberTest() 14 | { 15 | var expected = new DateTime( 2000, 11, 10 ); 16 | var actual = Int16Ex.November( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.October.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void OctoberTest() 14 | { 15 | var expected = new DateTime( 2000, 10, 10 ); 16 | var actual = Int16Ex.October( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.DateTime/System.DateTime/Int16.September.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void SeptemberTest() 14 | { 15 | var expected = new DateTime( 2000, 9, 10 ); 16 | var actual = Int16Ex.September( 10, 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.TimeSpan/Int16.ToDays.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void ToDaysTest() 14 | { 15 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 16 | 17 | var expected = TimeSpan.FromDays( value ); 18 | var actual = ( (Int16) value ).ToDays(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.TimeSpan/Int16.ToHours.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void ToHoursTest() 14 | { 15 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 16 | 17 | var expected = TimeSpan.FromHours( value ); 18 | var actual = ( (Int16) value ).ToHours(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.TimeSpan/Int16.ToMilliseconds.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void ToMillisecondsTest() 14 | { 15 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 16 | 17 | var expected = TimeSpan.FromMilliseconds( value ); 18 | var actual = ( (Int16) value ).ToMilliseconds(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.TimeSpan/Int16.ToMinutes.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void ToMinutesTest() 14 | { 15 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 16 | 17 | var expected = TimeSpan.FromMinutes( value ); 18 | var actual = ( (Int16) value ).ToMinutes(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int16/System.TimeSpan/Int16.ToSeconds.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int16ExTest 11 | { 12 | [Fact] 13 | public void ToSecondsTest() 14 | { 15 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 16 | 17 | var expected = TimeSpan.FromSeconds( value ); 18 | var actual = ( (Int16) value ).ToSeconds(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/Int32.FactorOf.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int32ExTest 10 | { 11 | [Fact] 12 | public void FactorOfTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt32(); 15 | var factorNumer = RandomValueEx.GetRandomInt32(); 16 | 17 | var expected = factorNumer % value == 0; 18 | var actual = value.FactorOf( factorNumer ); 19 | Assert.Equal( expected, actual ); 20 | 21 | value = 10; 22 | factorNumer = 100; 23 | actual = value.FactorOf( factorNumer ); 24 | Assert.True( actual ); 25 | 26 | value = 11; 27 | factorNumer = 100; 28 | actual = value.FactorOf( factorNumer ); 29 | Assert.False( actual ); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/Int32.IsEven.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int32ExTest 10 | { 11 | [Fact] 12 | public void IsEvenTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt32(); 15 | 16 | var expected = value % 2 == 0; 17 | var actual = value.IsEven(); 18 | Assert.Equal( expected, actual ); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/Int32.IsMultipleOf.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int32ExTest 10 | { 11 | [Fact] 12 | public void IsMultipleOfTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt32(); 15 | var factor = RandomValueEx.GetRandomInt32(); 16 | 17 | var expected = value % factor == 0; 18 | var actual = value.IsMultipleOf( factor ); 19 | Assert.Equal( expected, actual ); 20 | 21 | value = 10; 22 | factor = 2; 23 | 24 | actual = value.IsMultipleOf( factor ); 25 | Assert.True( actual ); 26 | 27 | value = 10; 28 | factor = 3; 29 | 30 | actual = value.IsMultipleOf( factor ); 31 | Assert.False( actual ); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/Int32.IsOdd.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class Int32ExTest 10 | { 11 | [Fact] 12 | public void IsOddTest() 13 | { 14 | var value = RandomValueEx.GetRandomInt32(); 15 | 16 | var expected = value % 2 != 0; 17 | var actual = value.IsOdd(); 18 | Assert.Equal( expected, actual ); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/Int32.DaysInMonth.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void DaysInMonthTest() 14 | { 15 | var year = RandomValueEx.GetRandomInt32( 1990, 2015 ); 16 | var month = RandomValueEx.GetRandomInt32( 1, 12 ); 17 | 18 | var expected = DateTime.DaysInMonth( year, month ); 19 | var actual = year.DaysInMonth( month ); 20 | Assert.Equal( expected, actual ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/Int32.IsLeapYear.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void IsLeapYearTest() 14 | { 15 | var year = RandomValueEx.GetRandomInt32( 1990, 2015 ); 16 | 17 | var expected = DateTime.IsLeapYear( year ); 18 | var actual = year.IsLeapYear(); 19 | Assert.Equal( expected, actual ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.April.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void AprilTest() 14 | { 15 | var expected = new DateTime( 2000, 4, 10 ); 16 | var actual = 10.April( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.August.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void AugustTest() 14 | { 15 | var expected = new DateTime( 2000, 8, 10 ); 16 | var actual = 10.August( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.December.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void DecemberTest() 14 | { 15 | var expected = new DateTime( 2000, 12, 10 ); 16 | var actual = 10.December( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.February.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void FebruaryTest() 14 | { 15 | var expected = new DateTime( 2000, 2, 10 ); 16 | var actual = 10.February( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.January.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void JanuaryTest() 14 | { 15 | var expected = new DateTime( 2000, 1, 10 ); 16 | var actual = 10.January( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.July.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void JulyTest() 14 | { 15 | var expected = new DateTime( 2000, 7, 10 ); 16 | var actual = 10.July( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.June.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void JuneTest() 14 | { 15 | var expected = new DateTime( 2000, 6, 10 ); 16 | var actual = 10.June( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.March.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void MarchTest() 14 | { 15 | var expected = new DateTime( 2000, 3, 10 ); 16 | var actual = 10.March( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.May.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void MayTest() 14 | { 15 | var expected = new DateTime( 2000, 5, 10 ); 16 | var actual = 10.May( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.November.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void NovemberTest() 14 | { 15 | var expected = new DateTime( 2000, 11, 10 ); 16 | var actual = 10.November( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.October.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void OctoberTest() 14 | { 15 | var expected = new DateTime( 2000, 10, 10 ); 16 | var actual = 10.October( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.DateTime/System.DateTime/Int32.September.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int32ExTest 11 | { 12 | [Fact] 13 | public void SeptemberTest() 14 | { 15 | var expected = new DateTime( 2000, 9, 10 ); 16 | var actual = 10.September( 2000 ); 17 | Assert.Equal( expected, actual ); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.TimeSpan/Int32.ToMilliseconds.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class Int32ExTest 12 | { 13 | [Fact] 14 | public void ToMillisecondsTest() 15 | { 16 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 17 | 18 | var expected = TimeSpan.FromMilliseconds( value ); 19 | var actual = value.ToMilliseconds(); 20 | 21 | actual 22 | .Should() 23 | .Be( expected ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.TimeSpan/Int32.ToMinutes.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class Int32ExTest 12 | { 13 | [Fact] 14 | public void ToMinutesTest() 15 | { 16 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 17 | 18 | var expected = TimeSpan.FromMinutes( value ); 19 | var actual = value.ToMinutes(); 20 | 21 | actual 22 | .Should() 23 | .Be( expected ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int32/System.TimeSpan/Int32.ToSeconds.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class Int32ExTest 12 | { 13 | [Fact] 14 | public void ToSecondsTest() 15 | { 16 | var value = RandomValueEx.GetRandomInt32( 1, 100 ); 17 | 18 | var expected = TimeSpan.FromSeconds( value ); 19 | var actual = value.ToSeconds(); 20 | 21 | actual 22 | .Should() 23 | .Be( expected ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int64/Int64.IsEven.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using FluentAssertions; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class Int64ExTest 11 | { 12 | [Fact] 13 | public void IsEvenOTest() 14 | { 15 | var actual = Int64Ex.IsEven( 0 ); 16 | actual.Should() 17 | .Be( true ); 18 | } 19 | 20 | [Fact] 21 | public void IsEvenTest() 22 | { 23 | var value = RandomValueEx.GetRandomInt32(); 24 | 25 | var expected = value % 2 == 0; 26 | var actual = Int64Ex.IsEven( value ); 27 | actual.Should() 28 | .Be( expected ); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Int64/Int64.IsOdd.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class Int64ExTest 12 | { 13 | [Fact] 14 | public void IsOdd0Test() 15 | { 16 | const Int64 value = 0; 17 | 18 | var actual = value.IsOdd(); 19 | actual.Should() 20 | .BeFalse(); 21 | } 22 | 23 | [Fact] 24 | public void IsOddTest() 25 | { 26 | var value = RandomValueEx.GetRandomInt32(); 27 | 28 | var expected = value % 2 != 0; 29 | var actual = Int64Ex.IsOdd( value ); 30 | Assert.Equal( expected, actual ); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Generic/Object.Generic.IfNull.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class ObjectExTest 10 | { 11 | [Fact] 12 | public void IfNullTest() 13 | { 14 | var expected = RandomValueEx.GetRandomString(); 15 | 16 | var actual = ObjectEx.IfNull( null, expected ); 17 | Assert.Equal( expected, actual ); 18 | 19 | actual = expected.IfNull( null ); 20 | Assert.Equal( expected, actual ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Generic/Object.Generic.IsDefault.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class ObjectExTest 11 | { 12 | [Fact] 13 | public void IsDefaultTest() 14 | { 15 | var value = default(String); 16 | // ReSharper disable once ExpressionIsAlwaysNull 17 | var actual = value.IsDefault(); 18 | Assert.True( actual ); 19 | 20 | value = RandomValueEx.GetRandomString(); 21 | actual = value.IsDefault(); 22 | Assert.False( actual ); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Generic/Object.Generic.Swap.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class ObjectExTest 12 | { 13 | [Fact] 14 | public void SwapTest() 15 | { 16 | var value0 = new List(); 17 | var value1 = new List { RandomValueEx.GetRandomString() }; 18 | 19 | this.Swap( ref value0, ref value1 ); 20 | Assert.Single( value0 ); 21 | Assert.Empty( value1 ); 22 | } 23 | 24 | [Fact] 25 | public void SwapTest1() 26 | { 27 | var value0 = 10; 28 | var value1 = 100; 29 | 30 | this.Swap( ref value0, ref value1 ); 31 | Assert.Equal( 100, value0 ); 32 | Assert.Equal( 10, value1 ); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Generic/Object.Generic.ToSingleItemArray.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class ObjectExTest 10 | { 11 | [Fact] 12 | public void ToSingleItemArrayTest() 13 | { 14 | var item = RandomValueEx.GetRandomString(); 15 | 16 | var actual = item.ToSingleItemArray(); 17 | 18 | Assert.Single( actual ); 19 | Assert.Equal( item, actual[0] ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Object.As.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class ObjectExTest 12 | { 13 | [Fact] 14 | public void AsTest() 15 | { 16 | Object value = 10; 17 | var actual = value.As(); 18 | 19 | Assert.Equal( value, actual ); 20 | } 21 | 22 | [Fact] 23 | public void AsTestNullValue() 24 | { 25 | var res = ObjectEx.As( null ); 26 | res.Should() 27 | .BeNull(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Object.IsNotNull.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class ObjectExTest 10 | { 11 | [Fact] 12 | public void IsNotNullTest() 13 | { 14 | var value = RandomValueEx.GetRandomString(); 15 | var actual = value.IsNotNull(); 16 | 17 | Assert.True( actual ); 18 | 19 | value = null; 20 | // ReSharper disable once ExpressionIsAlwaysNull 21 | actual = value.IsNotNull(); 22 | 23 | Assert.False( actual ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Object/Object.IsNull.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class ObjectExTest 10 | { 11 | [Fact] 12 | public void IsNullTest() 13 | { 14 | var value = RandomValueEx.GetRandomString(); 15 | var actual = value.IsNull(); 16 | 17 | Assert.False( actual ); 18 | 19 | value = null; 20 | // ReSharper disable once ExpressionIsAlwaysNull 21 | actual = value.IsNull(); 22 | 23 | Assert.True( actual ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.Random/Random.CoinToss.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing 10 | { 11 | public partial class RandomExTest 12 | { 13 | [Fact] 14 | public void CoinTossTest() 15 | { 16 | var random = new Random(); 17 | var actual = random.CoinToss(); 18 | 19 | actual.Should() 20 | .Be( actual ); 21 | } 22 | 23 | [Fact] 24 | public void CoinTossTestNullCheck() 25 | { 26 | // ReSharper disable once AssignNullToNotNullAttribute 27 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 28 | Action test = () => RandomEx.CoinToss( null ); 29 | 30 | Assert.Throws( test ); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.ExtractLetters.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void ExtractLettersTest() 14 | { 15 | var actual = "1a2b3c4".ExtractLetters(); 16 | Assert.Equal( "abc", actual ); 17 | } 18 | 19 | [Fact] 20 | public void ExtractLettersTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.ExtractLetters( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.ExtractNumbers.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void ExtractNumbersTest() 14 | { 15 | var actual = "1a2b3c4".ExtractNumbers(); 16 | Assert.Equal( "1234", actual ); 17 | } 18 | 19 | [Fact] 20 | public void ExtractNumbersTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.ExtractNumbers( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.IfNotEmpty.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class StringExTest 10 | { 11 | [Fact] 12 | public void IfEmptyTest() 13 | { 14 | var actual = StringEx.IfNotEmpty( null, "test" ); 15 | Assert.Equal( "test", actual ); 16 | 17 | actual = "".IfNotEmpty( "test" ); 18 | Assert.Equal( "test", actual ); 19 | 20 | actual = " ".IfNotEmpty( "test" ); 21 | Assert.Equal( "test", actual ); 22 | 23 | actual = "abc".IfNotEmpty( "test" ); 24 | Assert.Equal( "abc", actual ); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.IsAlpha.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void IsAlphaTest() 14 | { 15 | var actual = "test".IsAlpha(); 16 | Assert.True( actual ); 17 | 18 | actual = "1test".IsAlpha(); 19 | Assert.False( actual ); 20 | } 21 | 22 | [Fact] 23 | public void IsAlphaTestNullCheck() 24 | { 25 | // ReSharper disable once AssignNullToNotNullAttribute 26 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 27 | Action test = () => StringEx.IsAlpha( null ); 28 | 29 | Assert.Throws( test ); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.IsEmpty.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class StringExTest 10 | { 11 | [Fact] 12 | public void IsEmptyTest() 13 | { 14 | var value = ""; 15 | Assert.True( value.IsEmpty() ); 16 | 17 | value = null; 18 | Assert.True( value.IsEmpty() ); 19 | 20 | value = " "; 21 | Assert.True( value.IsEmpty() ); 22 | 23 | value = RandomValueEx.GetRandomString(); 24 | Assert.False( value.IsEmpty() ); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.IsNotEmpty.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Xunit; 4 | 5 | #endregion 6 | 7 | namespace Extend.Testing 8 | { 9 | public partial class StringExTest 10 | { 11 | [Fact] 12 | public void IsNotEmptyTest() 13 | { 14 | var value = ""; 15 | Assert.False( value.IsNotEmpty() ); 16 | 17 | value = null; 18 | Assert.False( value.IsNotEmpty() ); 19 | 20 | value = " "; 21 | Assert.False( value.IsNotEmpty() ); 22 | 23 | value = RandomValueEx.GetRandomString(); 24 | Assert.True( value.IsNotEmpty() ); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.IsNumeric.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void IsNumericTest() 14 | { 15 | var actual = "test".IsNumeric(); 16 | Assert.False( actual ); 17 | 18 | actual = "1test".IsNumeric(); 19 | Assert.False( actual ); 20 | 21 | actual = "123".IsNumeric(); 22 | Assert.True( actual ); 23 | } 24 | 25 | [Fact] 26 | public void IsNumericTestNullCheck() 27 | { 28 | // ReSharper disable once AssignNullToNotNullAttribute 29 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 30 | Action test = () => StringEx.IsNumeric( null ); 31 | 32 | Assert.Throws( test ); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.KeepLetters.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void KeepLettersTest() 14 | { 15 | var actual = "a1b2c3".KeepLetters(); 16 | Assert.Equal( "abc", actual ); 17 | } 18 | 19 | [Fact] 20 | public void KeepLettersTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.KeepLetters( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.KeepLettersAndNumbers.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void KeepLettersAndNumbersTest() 14 | { 15 | var actual = "a1b2c3".KeepLettersAndNumbers(); 16 | Assert.Equal( "a1b2c3", actual ); 17 | 18 | actual = "a1.b2-c3".KeepLettersAndNumbers(); 19 | Assert.Equal( "a1b2c3", actual ); 20 | } 21 | 22 | [Fact] 23 | public void KeepLettersAndNumbersTestNullCheck() 24 | { 25 | // ReSharper disable once AssignNullToNotNullAttribute 26 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 27 | Action test = () => StringEx.KeepLettersAndNumbers( null ); 28 | 29 | Assert.Throws( test ); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.KeepNumbers.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void KeepNumbersTest() 14 | { 15 | var actual = "a1b2c3".KeepNumbers(); 16 | Assert.Equal( "123", actual ); 17 | } 18 | 19 | [Fact] 20 | public void KeepNumbersTEstCaseNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.KeepNumbers( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.RemoveLetters.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void RemoveLettersTest() 14 | { 15 | var actual = "a1-b2.c3".RemoveLetters(); 16 | Assert.Equal( "1-2.3", actual ); 17 | } 18 | 19 | [Fact] 20 | public void RemoveLettersTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.RemoveLetters( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.RemoveLettersAndNumbers.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void RemoveLettersAndNumbersTest() 14 | { 15 | var actual = "a1-b2.c3".RemoveLettersAndNumbers(); 16 | Assert.Equal( "-.", actual ); 17 | } 18 | 19 | [Fact] 20 | public void RemoveLettersAndNumbersTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.RemoveLettersAndNumbers( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.RemoveNumbers.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void RemoveNumbersTest() 14 | { 15 | var actual = "a1-b2.c3".RemoveNumbers(); 16 | Assert.Equal( "a-b.c", actual ); 17 | } 18 | 19 | [Fact] 20 | public void RemoveNumbersTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.RemoveNumbers( null ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.SubstringLeft.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void SubstringLeftTest() 14 | { 15 | var actual = "testabc".SubstringLeft( 4 ); 16 | Assert.Equal( "test", actual ); 17 | } 18 | 19 | [Fact] 20 | public void SubstringLeftTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.SubstringLeft( null, 1 ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.String/String.SubstringRight.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class StringExTest 11 | { 12 | [Fact] 13 | public void SubstringRightTest() 14 | { 15 | var actual = "testabc".SubstringRight( 3 ); 16 | Assert.Equal( "abc", actual ); 17 | } 18 | 19 | [Fact] 20 | public void SubstringRightTestNullCheck() 21 | { 22 | // ReSharper disable once AssignNullToNotNullAttribute 23 | // ReSharper disable once ReturnValueOfPureMethodIsNotUsed 24 | Action test = () => StringEx.SubstringRight( null, 5 ); 25 | 26 | Assert.Throws( test ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.TimeSpan/TimeSpan.Future.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class TimeSpanExTest 11 | { 12 | [Fact] 13 | public void FutureTest() 14 | { 15 | var expected = DateTime.Now.Add( TimeSpan.FromDays( 1 ) ); 16 | var actual = TimeSpan.FromDays( 1 ) 17 | .Future(); 18 | 19 | Assert.Equal( expected.Day, actual.Day ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/System.TimeSpan/TimeSpan.Past.Test.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public partial class TimeSpanExTest 11 | { 12 | [Fact] 13 | public void FPastTest() 14 | { 15 | var expected = DateTime.Now.Subtract( TimeSpan.FromDays( 1 ) ); 16 | var actual = TimeSpan.FromDays( 1 ) 17 | .Past(); 18 | 19 | Assert.Equal( expected.Day, actual.Day ); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/Utilities/InstanceBuilder/Extension/MemberSelectionResultExTest.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using FluentAssertions; 4 | using Xunit; 5 | 6 | #endregion 7 | 8 | namespace Extend.Testing 9 | { 10 | public class MemberSelectionResultExTest 11 | { 12 | [Fact] 13 | public void AsBooleanTest() 14 | { 15 | MemberSelectionResult.IncludeMember.AsBoolean() 16 | .Should() 17 | .BeTrue(); 18 | MemberSelectionResult.ExcludeMember.AsBoolean() 19 | .Should() 20 | .BeFalse(); 21 | MemberSelectionResult.Neutral.AsBoolean() 22 | .Should() 23 | .Be( null ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend.Testing/Utilities/StringTemplate/Model/FormatInformationTest.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using Extend.Internal; 4 | using FluentAssertions; 5 | using Xunit; 6 | 7 | #endregion 8 | 9 | namespace Extend.Testing.Internal 10 | { 11 | public class FormatInformationTest 12 | { 13 | [Fact] 14 | public void FormatTest() 15 | { 16 | var expected = RandomValueEx.GetRandomString(); 17 | var target = new FormatInformation( "name", expected ); 18 | 19 | target.Format.Should() 20 | .Be( expected ); 21 | } 22 | 23 | [Fact] 24 | public void ValueNameTest() 25 | { 26 | var expected = RandomValueEx.GetRandomString(); 27 | var target = new FormatInformation( expected, null ); 28 | 29 | target.ValueName.Should() 30 | .Be( expected ); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /.Src/Extend/Extend.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.Src/Extend/Extend.snk -------------------------------------------------------------------------------- /.Src/Extend/Models/AttributeDefinitionType.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class representing a type and it's attributes of a specific type. 12 | /// 13 | /// The type of the attributes. 14 | public class AttributeDefinitionType : IAttributeDefinitionType where T : Attribute 15 | { 16 | #region Implementation of IAttributeDefinitionType 17 | 18 | /// 19 | /// Gets or sets the attributes. 20 | /// 21 | /// The attributes. 22 | public IEnumerable Attributes { get; set; } 23 | 24 | /// 25 | /// Gets or sets the type. 26 | /// 27 | /// The type. 28 | public Type Type { get; set; } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /.Src/Extend/Models/Definitions/IAttributeDefinitionType.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Interface representing the attribute definitions of a type. 12 | /// 13 | /// The type of the attributes. 14 | public interface IAttributeDefinitionType where T : Attribute 15 | { 16 | #region Properties 17 | 18 | /// 19 | /// Gets or sets the type. 20 | /// 21 | /// The type. 22 | Type Type { get; set; } 23 | 24 | /// 25 | /// Gets or sets the attributes. 26 | /// 27 | /// The attributes. 28 | IEnumerable Attributes { get; set; } 29 | 30 | #endregion 31 | } 32 | } -------------------------------------------------------------------------------- /.Src/Extend/Models/Definitions/IExecutionResult.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Interface representing the result of a safe method execution. 11 | /// 12 | public interface IExecutionResult 13 | { 14 | #region Properties 15 | 16 | /// 17 | /// Gets or sets the exception. 18 | /// 19 | /// The exception. 20 | Exception Exception { get; set; } 21 | 22 | /// 23 | /// Gets or sets the result. 24 | /// 25 | /// The result. 26 | T Result { get; set; } 27 | 28 | #endregion 29 | } 30 | } -------------------------------------------------------------------------------- /.Src/Extend/Models/Definitions/IIndexedItem.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Interface representing an item with an index. 11 | /// 12 | /// The type of the item 13 | public interface IIndexedItem 14 | { 15 | #region Properties 16 | 17 | /// 18 | /// Gets the index of the item. 19 | /// 20 | /// The index of the item. 21 | Int32 Index { get; } 22 | 23 | /// 24 | /// Gets the item. 25 | /// 26 | /// The item. 27 | T Item { get; } 28 | 29 | #endregion 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend/Models/ExecutionResult.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Class representing the result of a safe method execution. 11 | /// 12 | public class ExecutionResult : IExecutionResult 13 | { 14 | #region Implementation of IExecutionResult 15 | 16 | /// 17 | /// Gets or sets the exception. 18 | /// 19 | /// The exception. 20 | public Exception Exception { get; set; } 21 | 22 | /// 23 | /// Gets or sets the result. 24 | /// 25 | /// The result. 26 | public T Result { get; set; } 27 | 28 | #endregion 29 | } 30 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Array/Array.ClearAll.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class ArrayEx 14 | { 15 | /// 16 | /// Clears the given array. 17 | /// 18 | /// The array can not be null. 19 | /// The array to clear. 20 | [PublicAPI] 21 | public static void ClearAll( [NotNull] this Array array ) 22 | { 23 | array.ThrowIfNull( nameof(array) ); 24 | 25 | Array.Clear( array, 0, array.Length ); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsDigit.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as a decimal digit. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is a decimal digit, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsDigit( this Char c ) 23 | => Char.IsDigit( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsLetter.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as a Unicode letter. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is a letter, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsLetter( this Char c ) 23 | => Char.IsLetter( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsLetterOrDigit.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as a letter or a decimal digit. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is a letter or a decimal digit, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsLetterOrDigit( this Char c ) 23 | => Char.IsLetterOrDigit( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsLower.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as a lowercase letter. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is a lowercase letter, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsLower( this Char c ) 23 | => Char.IsLower( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsNumber.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as a number. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is a number, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsNumber( this Char c ) 23 | => Char.IsNumber( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsUpper.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as an uppercase letter. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is an uppercase letter, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsUpper( this Char c ) 23 | => Char.IsUpper( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.IsWhiteSpace.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Indicates whether the specified Unicode character is categorized as white space. 17 | /// 18 | /// The Unicode character to evaluate. 19 | /// True if the given char is a white space, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsWhiteSpace( this Char c ) 23 | => Char.IsWhiteSpace( c ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.Repeat.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Repeats the given Char the specified number of times. 17 | /// 18 | /// repeatCount is less than zero. 19 | /// The Char to repeat. 20 | /// Number of repeats. 21 | /// The repeated Char as String. 22 | [PublicAPI] 23 | [Pure] 24 | public static String Repeat( this Char c, Int32 repeatCount ) 25 | => new String( c, repeatCount ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.ToLower.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Converts the value of a Unicode character to its lowercase equivalent. 17 | /// 18 | /// The Unicode character to convert. 19 | /// 20 | /// The lowercase equivalent of , or the unchanged value of , if 21 | /// is already lowercase or not alphabetic. 22 | /// 23 | [PublicAPI] 24 | [Pure] 25 | public static Char ToLower( this Char c ) 26 | => Char.ToLower( c ); 27 | } 28 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Char/Char.ToUpper.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class CharEx 14 | { 15 | /// 16 | /// Converts the value of a Unicode character to its uppercase equivalent. 17 | /// 18 | /// The Unicode character to convert. 19 | /// 20 | /// The uppercase equivalent of , or the unchanged value of if 21 | /// is already uppercase, has no uppercase equivalent, or is not alphabetic. 22 | /// 23 | [PublicAPI] 24 | [Pure] 25 | public static Char ToUpper( this Char c ) 26 | => Char.ToUpper( c ); 27 | } 28 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.Elapsed.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Calculates the elapsed time between the given date time value and DateTime.Now. 17 | /// 18 | /// The date time value. 19 | /// Returns the elapsed time between the given date time value and DateTime.Now. 20 | [Pure] 21 | [PublicAPI] 22 | public static TimeSpan Elapsed( this DateTime dateTime ) 23 | => DateTime.Now - dateTime; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.EndOfDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the last moment of the day ("23:59:59:999") represented by the given date time value. 17 | /// 18 | /// The day to get the end of. 19 | /// Returns the last moment of the day ("23:59:59:999") represented by the given date time value. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime EndOfDay( this DateTime day ) 23 | => day 24 | .Date.AddDays( 1 ) 25 | .Subtract( 1.ToMilliseconds() ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.EndOfMonth.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the last moment ("23:59:59:999") of the month represented by the given date time value. 17 | /// 18 | /// The @this to act on. 19 | /// Returns the last moment ("23:59:59:999") of the month represented by the given date time value. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime EndOfMonth( this DateTime month ) 23 | => new DateTime( month.Year, month.Month, 1 ) 24 | .AddMonths( 1 ) 25 | .Subtract( 1.ToMilliseconds() ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.EndOfYear.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the last moment ("23:59:59:999") of the year represented by the given date time. 17 | /// 18 | /// The year to return the end of. 19 | /// Returns the last moment ("23:59:59:999") of the year represented by the given date time. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime EndOfYear( this DateTime year ) 23 | => new DateTime( year.Year, 12, 31, 23, 59, 59, 999 ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.FirstDayOfWeek.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the first day of the week, represented by the given date time. 17 | /// 18 | /// The week to return the first day of. 19 | /// Returns the first day of the week, represented by the given date time. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime FirstDayOfWeek( this DateTime week ) 23 | => new DateTime( week.Year, week.Month, week.Day ).AddDays( -(Int32) week.DayOfWeek ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsAfternoon.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks whether the given date time value is at afternoon or not. 17 | /// 18 | /// The date time to check. 19 | /// Returns true if the date time value is at afternoon, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsAfternoon( this DateTime dateTime ) 23 | => dateTime.TimeOfDay.TotalHours >= 12; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsFuture.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks if the date time value is in the future. 17 | /// 18 | /// The @date time to check. 19 | /// Returns true if the value is in the future, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsFuture( this DateTime dateTime ) 23 | => dateTime > DateTime.Now; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsLastDayOfMonth.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Gets a value indicating whether the given date-time value is the last day of the month represented in 17 | /// . 18 | /// 19 | /// The date-time value. 20 | /// Returns a value of true if the given date-time value is the last day of the month. 21 | [Pure] 22 | [PublicAPI] 23 | public static Boolean IsLastDayOfMonth( this DateTime dateTime ) 24 | => DateTime.DaysInMonth( dateTime.Year, dateTime.Month ) == dateTime.Day; 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsMorning.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks is the date time value is morning. 17 | /// 18 | /// The date time to check. 19 | /// Returns true if the date time is morning, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsMorning( this DateTime dateTime ) 23 | => dateTime.TimeOfDay.TotalHours < 12; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsPast.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks if the date time value is in the past. 17 | /// 18 | /// The date time to check. 19 | /// Returns true if the value is in the past, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsPast( this DateTime dateTime ) 23 | => dateTime < DateTime.Now; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsSameDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Gets whether the given date-time values are the same day. 17 | /// 18 | /// The first date-time value. 19 | /// The second date-time value. 20 | /// Returns true if the given date-time values are the same day, otherwise false. 21 | [Pure] 22 | [PublicAPI] 23 | public static Boolean IsSameDay( this DateTime dateTime, DateTime otherDateTime ) 24 | => dateTime.Date == otherDateTime.Date; 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsTimeEquals.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks if the time is equals to the given time. 17 | /// 18 | /// The time to check. 19 | /// The time to compare. 20 | /// Returns true if the time is equals, otherwise false. 21 | [Pure] 22 | [PublicAPI] 23 | public static Boolean IsTimeEquals( this DateTime time, DateTime timeToCompare ) 24 | => time.TimeOfDay == timeToCompare.TimeOfDay; 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsToday.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks if the given date time is today. 17 | /// 18 | /// The date time to check. 19 | /// Returns true if the date time value is today, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsToday( this DateTime dateTime ) 23 | => dateTime.Date == DateTime.Today; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsWeekDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks if the given day is a week day (MOnday - Friday). 17 | /// 18 | /// The day to check. 19 | /// Returns true if the day is a week day, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsWeekdDay( this DateTime day ) 23 | => day.DayOfWeek != DayOfWeek.Saturday 24 | && day.DayOfWeek != DayOfWeek.Sunday; 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.IsWeekendDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Checks if the given day is a weekend day (Saturday or Sunday). 17 | /// 18 | /// The day to check. 19 | /// Returns true if the day is a weekend day, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsWeekendDay( this DateTime day ) 23 | => day.DayOfWeek == DayOfWeek.Saturday 24 | || day.DayOfWeek == DayOfWeek.Sunday; 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.LastDayOfWeek.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the last day of the given week. 17 | /// 18 | /// The week to get the last day of. 19 | /// Returns the last day of the given week. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime LastDayOfWeek( this DateTime week ) 23 | => week.DayOfWeek == DayOfWeek.Sunday 24 | ? new DateTime( week.Year, week.Month, week.Day ) 25 | : new DateTime( week.Year, week.Month, week.Day ).AddDays( 7 - (Int32) week.DayOfWeek ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.NextMonthStart.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the first day of the next month, based on the given date-time value. 17 | /// 18 | /// The date-time value. 19 | /// Returns the first day of the next month, based on the given date-time value. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime NextMonthStart( this DateTime dateTime ) 23 | => dateTime.AddMonths( 1 ) 24 | .StartOfMonth(); 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.NextWeekDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Gets the next week day, based on the given day. 17 | /// 18 | /// The day. 19 | /// Returns the next week day (can be if the given day is a week day). 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime NextWeekDay( this DateTime day ) 23 | { 24 | while ( day.IsWeekendDay() ) 25 | day = day.Add( 1.ToDays() ); 26 | return day; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.StartOfDay.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the start of the given day ("00:00:00:000"). 17 | /// 18 | /// The day to get the start of. 19 | /// Returns the start of the given day ("00:00:00:000"). 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime StartOfDay( this DateTime day ) 23 | => new DateTime( day.Year, day.Month, day.Day ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.StartOfMonth.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the start of the given month (with time set to "00:00:00:000"). 17 | /// 18 | /// The month to get the start of. 19 | /// Returns the start of the given month (with time set to "00:00:00:000"). 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime StartOfMonth( this DateTime month ) 23 | => new DateTime( month.Year, month.Month, 1 ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.StartOfYear.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Returns the start of the given year with time set to "00:00:00:000". 17 | /// 18 | /// The year to get the start of. 19 | /// Returns the start of the given year with time set to "00:00:00:000". 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime StartOfYear( this DateTime year ) 23 | => new DateTime( year.Year, 1, 1 ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.Tomorrow.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Adds a day to the given date time value. 17 | /// 18 | /// The date time to increase. 19 | /// Tomorrow date at same time. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime Tomorrow( this DateTime dateTime ) 23 | => dateTime.AddDays( 1 ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.DateTime/DateTime.Yesterday.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DateTimeEx 14 | { 15 | /// 16 | /// Subtracts a day to the given date dateTime value. 17 | /// 18 | /// The date dateTime to decrease. 19 | /// Yesterday date at same dateTime. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime Yesterday( this DateTime dateTime ) 23 | => dateTime.AddDays( -1 ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/Double.IsInfinity.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns whether the specified number evaluates to negative or positive infinity. 17 | /// 18 | /// The double to check. 19 | /// Returns true if the given double is infinity, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsInfinity( this Double value ) 23 | => Double.IsInfinity( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/Double.IsNaN.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns whether the specified value is not a number. 17 | /// 18 | /// The double to check. 19 | /// Returns true if the value is not a number, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsNaN( this Double value ) 23 | => Double.IsNaN( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/Double.IsNegativeInfinity.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns whether the specified number evaluates to negative infinity. 17 | /// 18 | /// The double to check. 19 | /// Returns true if the given double is negative infinity, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsNegativeInfinity( this Double value ) 23 | => Double.IsNegativeInfinity( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/Double.IsPositiveInfinity.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns whether the specified number evaluates to positive infinity. 17 | /// 18 | /// The double to check. 19 | /// Returns true if the given double is positive infinity, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsPositiveInfinity( this Double value ) 23 | => Double.IsPositiveInfinity( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/System.TimeSpan/Double.ToDays.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns the given Double value as day. 17 | /// 18 | /// The Double value. 19 | /// Returns the given Double value as days. 20 | [Pure] 21 | [PublicAPI] 22 | public static TimeSpan ToDays( this Double value ) 23 | => TimeSpan.FromDays( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/System.TimeSpan/Double.ToHours.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns the given Double value as hours. 17 | /// 18 | /// The Double value. 19 | /// Returns the given Double value as hours. 20 | [Pure] 21 | [PublicAPI] 22 | public static TimeSpan ToHours( this Double value ) 23 | => TimeSpan.FromHours( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/System.TimeSpan/Double.ToMilliseconds.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns the given Double value as milliseconds. 17 | /// 18 | /// The Double value. 19 | /// Returns the given Double value as milliseconds. 20 | [Pure] 21 | [PublicAPI] 22 | public static TimeSpan ToMilliseconds( this Double value ) 23 | => TimeSpan.FromMilliseconds( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/System.TimeSpan/Double.ToMinutes.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns the given Double value as minutes. 17 | /// 18 | /// The Double value. 19 | /// Returns the given Double value as minutes. 20 | [Pure] 21 | [PublicAPI] 22 | public static TimeSpan ToMinutes( this Double value ) 23 | => TimeSpan.FromMinutes( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Double/System.TimeSpan/Double.ToSeconds.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class DoubleEx 14 | { 15 | /// 16 | /// Returns the given Double value as seconds. 17 | /// 18 | /// The Double value. 19 | /// Returns the given Double value as seconds. 20 | [Pure] 21 | [PublicAPI] 22 | public static TimeSpan ToSeconds( this Double value ) 23 | => TimeSpan.FromSeconds( value ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/Int16.IsEven.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Checks if the Int16 is even. 17 | /// 18 | /// The Int16 to check. 19 | /// Returns true if the Int16 is even, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsEven( this Int16 value ) 23 | => value % 2 == 0; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/Int16.IsMultipleOf.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Checks if the Int16 value is a multiple of the given factor. 17 | /// 18 | /// factor is 0. 19 | /// The Int16 to check. 20 | /// The factor. 21 | /// >Returns true if the Int16 value is a multiple of the given factor. 22 | [PublicAPI] 23 | [Pure] 24 | public static Boolean IsMultipleOf( this Int16 value, Int16 factor ) 25 | => value != 0 && value % factor == 0; 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/Int16.IsOdd.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Checks if the Int16 is odd. 17 | /// 18 | /// The Int16 to check. 19 | /// Returns true if the Int16 is odd, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsOdd( this Int16 value ) 23 | => value % 2 != 0; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.April.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in April 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in April in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime April( this Int16 day, Int16 year ) 25 | => new DateTime( year, 4, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.August.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Class containing some extension methods for . 11 | /// 12 | public static partial class Int16Ex 13 | { 14 | /// 15 | /// Returns a date-time representing the specified day in August 16 | /// in the specified year. 17 | /// 18 | /// The day. 19 | /// The year. 20 | /// Return a date-time representing the specified day in August in the specified year. 21 | /// [Pure] 22 | /// [PublicAPI] 23 | public static DateTime August( this Int16 day, Int16 year ) 24 | => new DateTime( year, 8, day ); 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.December.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in December 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in December in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime December( this Int16 day, Int16 year ) 25 | => new DateTime( year, 12, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.February.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in February 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in February in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime February( this Int16 day, Int16 year ) 25 | => new DateTime( year, 2, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.January.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Class containing some extension methods for . 11 | /// 12 | public static partial class Int16Ex 13 | { 14 | /// 15 | /// Returns a date-time representing the specified day in January 16 | /// in the specified year. 17 | /// 18 | /// The day. 19 | /// The year. 20 | /// Return a date-time representing the specified day in January in the specified year. 21 | /// [Pure] 22 | /// [PublicAPI] 23 | public static DateTime January( this Int16 day, Int16 year ) 24 | => new DateTime( year, 1, day ); 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.July.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Class containing some extension methods for . 11 | /// 12 | public static partial class Int16Ex 13 | { 14 | /// 15 | /// Returns a date-time representing the specified day in July 16 | /// in the specified year. 17 | /// 18 | /// The day. 19 | /// The year. 20 | /// Return a date-time representing the specified day in July in the specified year. 21 | /// [Pure] 22 | /// [PublicAPI] 23 | public static DateTime July( this Int16 day, Int16 year ) 24 | => new DateTime( year, 7, day ); 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.June.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Class containing some extension methods for . 11 | /// 12 | public static partial class Int16Ex 13 | { 14 | /// 15 | /// Returns a date-time representing the specified day in June 16 | /// in the specified year. 17 | /// 18 | /// The day. 19 | /// The year. 20 | /// Return a date-time representing the specified day in June in the specified year. 21 | /// [Pure] 22 | /// [PublicAPI] 23 | public static DateTime June( this Int16 day, Int16 year ) 24 | => new DateTime( year, 6, day ); 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.March.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in March 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in March in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime March( this Int16 day, Int16 year ) 25 | => new DateTime( year, 3, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.May.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in May 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in May in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime May( this Int16 day, Int16 year ) 25 | => new DateTime( year, 5, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.November.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in November 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in November in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime November( this Int16 day, Int16 year ) 25 | => new DateTime( year, 11, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.October.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in October 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in October in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime October( this Int16 day, Int16 year ) 25 | => new DateTime( year, 10, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/FromMonth/Int16.September.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in September 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in September in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime September( this Int16 day, Int16 year ) 25 | => new DateTime( year, 9, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int16/System.DateTime/Int16.IsLeapYear.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int16Ex 14 | { 15 | /// 16 | /// Returns whether the given year is a leap year or not. 17 | /// 18 | /// The year. 19 | /// Returns true if the year is a leap year, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsLeapYear( this Int16 year ) 23 | => DateTime.IsLeapYear( year ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/Int32.IsEven.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Checks if the Int32 is even. 17 | /// 18 | /// The Int32 to check. 19 | /// Returns true if the Int32 is even, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsEven( this Int32 value ) 23 | => value % 2 == 0; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/Int32.IsMultipleOf.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Checks if the Int32 value is a multiple of the given factor. 17 | /// 18 | /// factor is 0. 19 | /// The Int32 to check. 20 | /// The factor. 21 | /// >Returns true if the Int32 value is a multiple of the given factor. 22 | [PublicAPI] 23 | [Pure] 24 | public static Boolean IsMultipleOf( this Int32 value, Int32 factor ) 25 | => value != 0 && value % factor == 0; 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/Int32.IsOdd.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Checks if the Int32 is odd. 17 | /// 18 | /// The Int32 to check. 19 | /// Returns true if the Int32 is odd, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsOdd( this Int32 value ) 23 | => value % 2 != 0; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.April.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in April 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in April in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime April( this Int32 day, Int32 year ) 25 | => new DateTime( year, 4, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.August.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in August 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in August in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime August( this Int32 day, Int32 year ) 25 | => new DateTime( year, 8, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.December.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in December 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in December in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime December( this Int32 day, Int32 year ) 25 | => new DateTime( year, 12, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.February.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in February 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in February in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime February( this Int32 day, Int32 year ) 25 | => new DateTime( year, 2, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.January.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in January 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in January in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime January( this Int32 day, Int32 year ) 25 | => new DateTime( year, 1, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.July.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in July 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in July in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime July( this Int32 day, Int32 year ) 25 | => new DateTime( year, 7, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.June.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in June 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in June in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime June( this Int32 day, Int32 year ) 25 | => new DateTime( year, 6, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.March.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in March 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in March in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime March( this Int32 day, Int32 year ) 25 | => new DateTime( year, 3, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.May.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in May 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in May in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime May( this Int32 day, Int32 year ) 25 | => new DateTime( year, 5, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.November.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in November 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in November in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime November( this Int32 day, Int32 year ) 25 | => new DateTime( year, 11, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.October.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in October 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in October in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime October( this Int32 day, Int32 year ) 25 | => new DateTime( year, 10, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/FromMonth/Int32.September.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns a date-time representing the specified day in September 17 | /// in the specified year. 18 | /// 19 | /// The day. 20 | /// The year. 21 | /// Return a date-time representing the specified day in September in the specified year. 22 | [Pure] 23 | [PublicAPI] 24 | public static DateTime September( this Int32 day, Int32 year ) 25 | => new DateTime( year, 9, day ); 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int32/System.DateTime/Int32.IsLeapYear.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int32Ex 14 | { 15 | /// 16 | /// Returns whether the given year is a leap year or not. 17 | /// 18 | /// The year. 19 | /// Returns true if the year is a leap year, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsLeapYear( this Int32 year ) 23 | => DateTime.IsLeapYear( year ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int64/Int64.IsEven.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int64Ex 14 | { 15 | /// 16 | /// Checks if the Int64 is even. 17 | /// 18 | /// The Int64 to check. 19 | /// Returns true if the Int64 is even, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsEven( this Int64 value ) 23 | => value % 2 == 0; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int64/Int64.IsMultipleOf.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int64Ex 14 | { 15 | /// 16 | /// Checks if the Int64 value is a multiple of the given factor. 17 | /// 18 | /// factor is 0. 19 | /// The Int64 to check. 20 | /// The factor. 21 | /// >Returns true if the Int64 value is a multiple of the given factor. 22 | [PublicAPI] 23 | [Pure] 24 | public static Boolean IsMultipleOf( this Int64 value, Int64 factor ) 25 | => value != 0 && value % factor == 0; 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Int64/Int64.IsOdd.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class Int64Ex 14 | { 15 | /// 16 | /// Checks if the Int64 is odd. 17 | /// 18 | /// The Int64 to check. 19 | /// Returns true if the Int64 is odd, otherwise false. 20 | [PublicAPI] 21 | [Pure] 22 | public static Boolean IsOdd( this Int64 value ) 23 | => value % 2 != 0; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Lazy[T]/Layz[T].DisposeIfIsValueCreated.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing extension methods for . 12 | /// 13 | public static class LayzEx 14 | { 15 | /// 16 | /// Disposes the value of the given lazy, if the value was created. 17 | /// 18 | /// The type of object that is being lazily initialized. 19 | /// A see . 20 | [PublicAPI] 21 | public static void DisposeIfIsValueCreated( [CanBeNull] this Lazy lazy ) where T : IDisposable 22 | { 23 | if ( lazy != null && lazy.IsValueCreated ) 24 | lazy.Value.Dispose(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Object/Generic/Object.Generic.IsDefault.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class ObjectEx 14 | { 15 | /// 16 | /// Checks if the given value is the default value of it's type. 17 | /// 18 | /// The type of the value. 19 | /// The value to check. 20 | /// Returns true if the value is the default value of it's type. 21 | [Pure] 22 | [PublicAPI] 23 | public static Boolean IsDefault( [CanBeNull] this T value ) 24 | => Equals( value, default(T) ); 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Object/Generic/Object.Generic.ToSingleItemArray.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using JetBrains.Annotations; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Class containing some extension methods for . 11 | /// 12 | public static partial class ObjectEx 13 | { 14 | /// 15 | /// Creates a array with the given value as only item. 16 | /// 17 | /// The type of the items in the array. 18 | /// The value to add to the new created array. 19 | /// Returns the new created array. 20 | [NotNull] 21 | [ItemCanBeNull] 22 | [Pure] 23 | [PublicAPI] 24 | public static T[] ToSingleItemArray( [CanBeNull] this T value ) 25 | => new[] 26 | { 27 | value 28 | }; 29 | } 30 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Object/Object.As.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class ObjectEx 14 | { 15 | /// 16 | /// Cast the given object to the specified type. 17 | /// 18 | /// The type. 19 | /// The object to cast. 20 | /// The object as the specified type. 21 | [CanBeNull] 22 | [Pure] 23 | [PublicAPI] 24 | public static T As( [CanBeNull] this Object obj ) 25 | => (T) obj; 26 | } 27 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Object/Object.IsNotNull.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class ObjectEx 14 | { 15 | /// 16 | /// Gets whether the given is NOT null or not. 17 | /// 18 | /// The to check. 19 | /// A value of true if the is NOT null, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsNotNull( [CanBeNull] this Object obj ) 23 | => obj != null; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Object/Object.IsNull.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class ObjectEx 14 | { 15 | /// 16 | /// Gets whether the given is null or not. 17 | /// 18 | /// The to check. 19 | /// A value of true if the is null, otherwise false. 20 | [Pure] 21 | [PublicAPI] 22 | public static Boolean IsNull( [CanBeNull] this Object obj ) 23 | => obj == null; 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.Random/Random.CoinToss.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class RandomEx 14 | { 15 | /// 16 | /// Returns randomly true or false. 17 | /// 18 | /// random can not be null. 19 | /// The random to use. 20 | /// Returns true or false (random value). 21 | [Pure] 22 | [PublicAPI] 23 | public static Boolean CoinToss( [NotNull] this Random random ) 24 | { 25 | random.ThrowIfNull( nameof(random) ); 26 | 27 | return random.Next( 2 ) == 0; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/Convert/String.ToGuid.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Converts the given string to a GUID. 14 | /// 15 | /// The value can not be null. 16 | /// value is not in a recognized format. 17 | /// The string to convert. 18 | /// Returns the converted GUID. 19 | [Pure] 20 | [PublicAPI] 21 | public static Guid ToGuid( [NotNull] this String value ) 22 | { 23 | value.ThrowIfNull( nameof(value) ); 24 | 25 | return Guid.Parse( value ); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/ConvertSafe/String.SafeToBoolean.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Tries to convert the specified string representation of a logical value to 14 | /// its equivalent. 15 | /// 16 | /// A string containing the value to convert. 17 | /// The default value, returned if the conversion fails. 18 | /// Returns the converted value, or the given default value if the conversion failed. 19 | [Pure] 20 | [PublicAPI] 21 | public static Boolean SafeToBoolean( [CanBeNull] this String value, Boolean defaultValue = default ) 22 | => value.TryParsBoolean( out var outValue ) ? outValue : defaultValue; 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/ConvertSafe/String.SafeToChar.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Converts the value of the specified string to its equivalent Unicode character. 14 | /// 15 | /// A string that contains a single character. 16 | /// The default value, returned if the parsing fails. 17 | /// Returns the converted value, or the given default value if the conversion failed. 18 | [Pure] 19 | [PublicAPI] 20 | public static Char SafeToChar( [CanBeNull] this String value, Char defaultValue = default ) 21 | => value.TryParsChar( out var outValue ) ? outValue : defaultValue; 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.CompareOrdinal.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Compares the given strings using . 14 | /// 15 | /// The first string to compare. 16 | /// The second string to compare. 17 | /// Returns true if the given strings are equals, otherwise false. 18 | [Pure] 19 | [PublicAPI] 20 | public static Boolean CompareOrdinal( this String value, String compareValue ) 21 | => String.Compare( value, compareValue, StringComparison.Ordinal ) == 0; 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.CompareOrdinalIgnoreCase.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Compares the given strings using . 14 | /// 15 | /// The first string to compare. 16 | /// The second string to compare. 17 | /// Returns true if the given strings are equals, otherwise false. 18 | [Pure] 19 | [PublicAPI] 20 | public static Boolean CompareOrdinalIgnoreCase( [CanBeNull] this String value, [CanBeNull] String compareValue ) 21 | => String.Compare( value, compareValue, StringComparison.OrdinalIgnoreCase ) == 0; 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.IfNotEmpty.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Returns the input value if it's not empty, otherwise the alternative value. 14 | /// 15 | /// The input string. 16 | /// The alternative value. 17 | /// The input or the alternative value. 18 | [CanBeNull] 19 | [Pure] 20 | [PublicAPI] 21 | public static String IfNotEmpty( [CanBeNull] this String value, [CanBeNull] String alternativeValue ) 22 | => !value.IsEmpty() ? value : alternativeValue; 23 | } 24 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.IsAlpha.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Linq; 5 | using JetBrains.Annotations; 6 | 7 | #endregion 8 | 9 | namespace Extend 10 | { 11 | public static partial class StringEx 12 | { 13 | /// 14 | /// Checks if the string is alpha. 15 | /// 16 | /// The string can not be null. 17 | /// The string to check. 18 | /// Returns true if the string is alpha only, otherwise false. 19 | [Pure] 20 | [PublicAPI] 21 | public static Boolean IsAlpha( [NotNull] this String str ) 22 | { 23 | str.ThrowIfNull( nameof(str) ); 24 | 25 | return str.ToCharArray() 26 | .All( x => x.IsLetter() ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.IsAlphaNumeric.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Linq; 5 | using JetBrains.Annotations; 6 | 7 | #endregion 8 | 9 | namespace Extend 10 | { 11 | public static partial class StringEx 12 | { 13 | /// 14 | /// Checks if the string is alpha numeric. 15 | /// 16 | /// The string can not be null. 17 | /// The string to check. 18 | /// Returns true if the string is alpha numeric, otherwise false. 19 | [Pure] 20 | [PublicAPI] 21 | public static Boolean IsAlphaNumeric( [NotNull] this String str ) 22 | { 23 | str.ThrowIfNull( nameof(str) ); 24 | 25 | return str.ToCharArray() 26 | .All( x => x.IsLetter() || x.IsNumber() ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.IsEmpty.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Gets whether the given is empty or not. 14 | /// 15 | /// The to check. 16 | /// A value of true if the given is empty, otherwise false. 17 | [Pure] 18 | [PublicAPI] 19 | public static Boolean IsEmpty( [CanBeNull] this String str ) 20 | => String.IsNullOrEmpty( str ) || String.IsNullOrWhiteSpace( str ); 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.IsNotEmpty.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Gets whether the given is empty or not. 14 | /// 15 | /// The to check. 16 | /// A value of true if the given is not empty, otherwise false. 17 | [Pure] 18 | [PublicAPI] 19 | public static Boolean IsNotEmpty( [CanBeNull] this String input ) 20 | => !IsEmpty( input ); 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.IsNumeric.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Linq; 5 | using JetBrains.Annotations; 6 | 7 | #endregion 8 | 9 | namespace Extend 10 | { 11 | public static partial class StringEx 12 | { 13 | /// 14 | /// Checks if the string is numeric. 15 | /// 16 | /// The string can not be null. 17 | /// The string to check. 18 | /// Returns true if the string is numeric only, otherwise false. 19 | [Pure] 20 | [PublicAPI] 21 | public static Boolean IsNumeric( [NotNull] this String str ) 22 | { 23 | str.ThrowIfNull( nameof(str) ); 24 | 25 | return str.ToCharArray() 26 | .All( x => x.IsNumber() ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.RemoveNumbers.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Linq; 5 | using JetBrains.Annotations; 6 | 7 | #endregion 8 | 9 | namespace Extend 10 | { 11 | public static partial class StringEx 12 | { 13 | /// 14 | /// Removes all numbers from the given string. 15 | /// 16 | /// s can not be null. 17 | /// The input string. 18 | /// The given string without any numbers. 19 | [NotNull] 20 | [Pure] 21 | [PublicAPI] 22 | public static String RemoveNumbers( [NotNull] this String s ) 23 | { 24 | s.ThrowIfNull( nameof(s) ); 25 | 26 | return new String( s.ToCharArray() 27 | .Where( x => !x.IsNumber() ) 28 | .ToArray() ); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.Reverse.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | public static partial class StringEx 11 | { 12 | /// 13 | /// Reverses the given string. 14 | /// 15 | /// The string can not be null. 16 | /// The string to reverse. 17 | /// Returns the reversed string. 18 | [NotNull] 19 | [Pure] 20 | [PublicAPI] 21 | public static String Reverse( [NotNull] this String s ) 22 | { 23 | s.ThrowIfNull( nameof(s) ); 24 | 25 | return s.Length <= 1 26 | ? s 27 | : new String( s.ToCharArray() 28 | .Reverse() ); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/String.WildcardToRegex.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.Text.RegularExpressions; 5 | using JetBrains.Annotations; 6 | 7 | #endregion 8 | 9 | namespace Extend 10 | { 11 | public static partial class StringEx 12 | { 13 | /// 14 | /// Converts the given wild-card pattern to a RegEx. 15 | /// 16 | /// A wild-card pattern. 17 | /// Returns the equivalent RegEx. 18 | [Pure] 19 | [NotNull] 20 | public static String WildcardToRegex( [NotNull] this String pattern ) 21 | { 22 | pattern.ThrowIfNull( nameof(pattern) ); 23 | 24 | return "^" + Regex.Escape( pattern ) 25 | .Replace( @"\*", ".*" ) 26 | .Replace( @"\?", "." ) 27 | + "$"; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /.Src/Extend/System.String/System.IO.Path/String.GetFileExtension.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using System.IO; 5 | using JetBrains.Annotations; 6 | 7 | #endregion 8 | 9 | namespace Extend 10 | { 11 | public static partial class StringEx 12 | { 13 | /// 14 | /// Gets the extension of the given file. 15 | /// 16 | /// The file name can not be null. 17 | /// The name of the file. 18 | /// The file extension. 19 | [NotNull] 20 | [Pure] 21 | [PublicAPI] 22 | public static String GetFileExtension( [NotNull] this String fileName ) 23 | { 24 | fileName.ThrowIfNull( nameof(fileName) ); 25 | 26 | return Path.GetExtension( fileName ); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /.Src/Extend/System.TimeSpan/TimeSpan.Future.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class TimeSpanEx 14 | { 15 | /// 16 | /// Adds the given time span to the current date time. 17 | /// 18 | /// The time span to add. 19 | /// Returns the current date time with the specified time span added to it. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime Future( this TimeSpan timeSpan ) 23 | => DateTime.Now.Add( timeSpan ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/System.TimeSpan/TimeSpan.Past.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | using JetBrains.Annotations; 5 | 6 | #endregion 7 | 8 | namespace Extend 9 | { 10 | /// 11 | /// Class containing some extension methods for . 12 | /// 13 | public static partial class TimeSpanEx 14 | { 15 | /// 16 | /// Subtracts the specified time span to the current date time. 17 | /// 18 | /// The time span to subtract. 19 | /// Returns the current date time with the specified time span subtracted from it. 20 | [Pure] 21 | [PublicAPI] 22 | public static DateTime Past( this TimeSpan timeSpan ) 23 | => DateTime.Now.Subtract( timeSpan ); 24 | } 25 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/InstanceBuilder/FluentInterface/Definition/IFactoryOptionsConstistent.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Interface representing a configured factory. 5 | /// 6 | /// The type of the object to create. 7 | public interface IFactoryOptionsConstistent : IFactoryOptionsInconsistent, ICreateInstanceOptions where T : class 8 | { 9 | } 10 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/InstanceBuilder/MemberSelection/Definition/IMemberSelectionRuleInspector.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System.Collections.Generic; 4 | 5 | #endregion 6 | 7 | namespace Extend 8 | { 9 | /// 10 | /// Interface representing a rule inspector. 11 | /// 12 | public interface IMemberSelectionRuleInspector 13 | { 14 | /// 15 | /// Inspects the given rules for the given member. 16 | /// 17 | /// A collection of rules. 18 | /// The member information to check. 19 | /// Returns the inspection result. 20 | MemberSelectionResult Inspect( IEnumerable rules, IMemberInformation memberInformation ); 21 | } 22 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/InstanceBuilder/MemberSelection/Enum/CompareMode.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Enumeration of all possible compare modes. 5 | /// 6 | public enum CompareMode 7 | { 8 | /// 9 | /// Check if equals to value. 10 | /// 11 | Is = 0, 12 | 13 | /// 14 | /// Check if is not equals to value. 15 | /// 16 | IsNot = 1 17 | } 18 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/InstanceBuilder/MemberSelection/Enum/MemberSelectionMode.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Enumeration of all member selection modes. 5 | /// 6 | public enum MemberSelectionMode 7 | { 8 | /// 9 | /// Include a member. 10 | /// 11 | Include = 0, 12 | 13 | /// 14 | /// Exude a member. 15 | /// 16 | Exclude = 1 17 | } 18 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/InstanceBuilder/MemberSelection/Enum/MemberSelectionResult.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Enumeration of all possible member selection results. 5 | /// 6 | public enum MemberSelectionResult 7 | { 8 | /// 9 | /// Include the member. 10 | /// 11 | IncludeMember = 0, 12 | 13 | /// 14 | /// Exclude the member. 15 | /// 16 | ExcludeMember = 1, 17 | 18 | /// 19 | /// Rule does not apply to member. 20 | /// 21 | Neutral = 2 22 | } 23 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/InstanceBuilder/MemberSelection/Enum/MemberSelectionRuleTarget.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Enumeration of all member selection rule targets. 5 | /// 6 | /// 7 | /// Used to build create instance options. 8 | /// 9 | internal enum MemberSelectionRuleTarget 10 | { 11 | /// 12 | /// The rule targets the member itself. 13 | /// 14 | Member = 0, 15 | 16 | /// 17 | /// The rule targets the children of the member. 18 | /// 19 | MemberChildren = 1, 20 | 21 | /// 22 | /// The rule targets a factory. 23 | /// 24 | Factory = 2 25 | } 26 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/StringTemplate/ValueProvider/IValueProvider.cs: -------------------------------------------------------------------------------- 1 | #region Usings 2 | 3 | using System; 4 | 5 | #endregion 6 | 7 | namespace Extend.Internal 8 | { 9 | /// 10 | /// Class representing a value provider for string formating. 11 | /// 12 | public interface IValueProvider 13 | { 14 | /// 15 | /// Gets the value represented by the given expression. 16 | /// 17 | /// The name of a property optionally combined with a string format compatible expression. 18 | /// Returns the value represented by the given expression. 19 | String GetValue( String expression ); 20 | } 21 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/Tree/Definition/ITreeNodeAware.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Interface representing a type which gets informed about it's tree node. 5 | /// 6 | /// The type of the nodes value. 7 | public interface ITreeNodeAware 8 | { 9 | #region Properties 10 | 11 | /// 12 | /// Gets or sets the node of the object. 13 | /// 14 | /// The node of the object. 15 | ITreeNode Node { get; set; } 16 | 17 | #endregion 18 | } 19 | } -------------------------------------------------------------------------------- /.Src/Extend/Utilities/Tree/Definition/TreeTraversalDirection.cs: -------------------------------------------------------------------------------- 1 | namespace Extend 2 | { 3 | /// 4 | /// Enumeration of all traversal directions. 5 | /// 6 | public enum TreeTraversalDirection 7 | { 8 | /// 9 | /// Traverse from top to bottom. 10 | /// 11 | TopDown, 12 | 13 | /// 14 | /// Traverse from bottom to top. 15 | /// 16 | BottomUp 17 | } 18 | } -------------------------------------------------------------------------------- /.tools/7zip/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/7zip/7za.exe -------------------------------------------------------------------------------- /.tools/Cake/Autofac.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Autofac.dll -------------------------------------------------------------------------------- /.tools/Cake/Cake.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Cake.Common.dll -------------------------------------------------------------------------------- /.tools/Cake/Cake.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Cake.Core.dll -------------------------------------------------------------------------------- /.tools/Cake/Cake.NuGet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Cake.NuGet.dll -------------------------------------------------------------------------------- /.tools/Cake/Cake.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Cake.exe -------------------------------------------------------------------------------- /.tools/Cake/Cake.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": {} 3 | } -------------------------------------------------------------------------------- /.tools/Cake/Microsoft.CodeAnalysis.CSharp.Scripting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Microsoft.CodeAnalysis.CSharp.Scripting.dll -------------------------------------------------------------------------------- /.tools/Cake/Microsoft.CodeAnalysis.CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Microsoft.CodeAnalysis.CSharp.dll -------------------------------------------------------------------------------- /.tools/Cake/Microsoft.CodeAnalysis.Scripting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Microsoft.CodeAnalysis.Scripting.dll -------------------------------------------------------------------------------- /.tools/Cake/Microsoft.CodeAnalysis.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Microsoft.CodeAnalysis.dll -------------------------------------------------------------------------------- /.tools/Cake/Microsoft.Web.XmlTransform.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Microsoft.Web.XmlTransform.dll -------------------------------------------------------------------------------- /.tools/Cake/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Commands.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Commands.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Common.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Common.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Configuration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Configuration.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.DependencyResolver.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.DependencyResolver.Core.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Frameworks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Frameworks.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.LibraryModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.LibraryModel.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.PackageManagement.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.PackageManagement.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Packaging.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Packaging.Core.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Packaging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Packaging.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.ProjectModel.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.ProjectModel.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Protocol.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Protocol.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Resolver.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Resolver.dll -------------------------------------------------------------------------------- /.tools/Cake/NuGet.Versioning.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/NuGet.Versioning.dll -------------------------------------------------------------------------------- /.tools/Cake/System.AppContext.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.AppContext.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Collections.Immutable.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Collections.Immutable.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Console.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Console.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Diagnostics.FileVersionInfo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Diagnostics.FileVersionInfo.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Diagnostics.StackTrace.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Diagnostics.StackTrace.dll -------------------------------------------------------------------------------- /.tools/Cake/System.IO.Compression.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.IO.Compression.dll -------------------------------------------------------------------------------- /.tools/Cake/System.IO.FileSystem.Primitives.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.IO.FileSystem.Primitives.dll -------------------------------------------------------------------------------- /.tools/Cake/System.IO.FileSystem.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.IO.FileSystem.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Reflection.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Reflection.Metadata.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Security.Cryptography.Algorithms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Security.Cryptography.Algorithms.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Security.Cryptography.Encoding.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Security.Cryptography.Encoding.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Security.Cryptography.Primitives.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Security.Cryptography.Primitives.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Security.Cryptography.X509Certificates.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Security.Cryptography.X509Certificates.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Text.Encoding.CodePages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Text.Encoding.CodePages.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Threading.Thread.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Threading.Thread.dll -------------------------------------------------------------------------------- /.tools/Cake/System.ValueTuple.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.ValueTuple.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Xml.ReaderWriter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Xml.ReaderWriter.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Xml.XPath.XDocument.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Xml.XPath.XDocument.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Xml.XPath.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Xml.XPath.dll -------------------------------------------------------------------------------- /.tools/Cake/System.Xml.XmlDocument.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Cake/System.Xml.XmlDocument.dll -------------------------------------------------------------------------------- /.tools/Curl/curl.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/Curl/curl.exe -------------------------------------------------------------------------------- /.tools/NuGet/nuget.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DaveSenn/Extend/481aa12882d141468c5026ff1416790d21c74ece/.tools/NuGet/nuget.exe --------------------------------------------------------------------------------