microsoft / XamlBehaviorsWpf
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 359 units with 4,709 lines of code in units (61.8% of code).
    • 1 very long units (120 lines of code)
    • 11 long units (749 lines of code)
    • 45 medium size units (1,471 lines of code)
    • 70 small units (1,057 lines of code)
    • 232 very small units (1,312 lines of code)
2% | 15% | 31% | 22% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cs2% | 15% | 31% | 22% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/Microsoft.Xaml.Behaviors/Layout17% | 18% | 25% | 19% | 19%
src/Microsoft.Xaml.Behaviors/Core0% | 26% | 36% | 14% | 22%
src/Microsoft.Xaml.Behaviors0% | 7% | 28% | 28% | 35%
src/Microsoft.Xaml.Behaviors/Media0% | 0% | 49% | 11% | 39%
src0% | 0% | 51% | 43% | 5%
src/Microsoft.Xaml.Behaviors/Input0% | 0% | 9% | 55% | 34%
src/Microsoft.Xaml.Behaviors.Design0% | 0% | 0% | 0% | 100%
src/Microsoft.Xaml.Behaviors.DesignTools0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
internal override void UpdateLayoutTransitionCore()
in src/Microsoft.Xaml.Behaviors/Layout/FluidMoveBehavior.cs
120 24 4
protected override bool GoToStateCore()
in src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
91 16 6
private static Storyboard CreateLayoutTransitionStoryboard()
in src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
84 19 3
protected override void Invoke()
in src/Microsoft.Xaml.Behaviors/Core/ChangePropertyAction.cs
79 16 1
private static List FindTargetElements()
in src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
79 27 5
internal static Transform CloneTransform()
in src/Microsoft.Xaml.Behaviors/Layout/MouseDragElementBehavior.cs
69 9 1
private void OnCollectionChanged()
in src/Microsoft.Xaml.Behaviors/AttachableCollection.cs
65 12 2
private static object GetValueFromTimeline()
in src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
65 8 2
private Storyboard CreateTransitionStoryboard()
in src/Microsoft.Xaml.Behaviors/Layout/FluidMoveBehavior.cs
56 12 4
internal static bool EvaluateImpl()
in src/Microsoft.Xaml.Behaviors/ComparisonLogic.cs
55 18 3
internal static Rect GetLayoutRect()
in src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
55 16 1
private static object TryAddition()
in src/Microsoft.Xaml.Behaviors/Core/ChangePropertyAction.cs
51 8 2
protected override void Invoke()
in src/Microsoft.Xaml.Behaviors/Core/RemoveElementAction.cs
50 12 1
private void AnimatePropertyChange()
in src/Microsoft.Xaml.Behaviors/Core/ChangePropertyAction.cs
48 8 3
protected override void Invoke()
in src/Microsoft.Xaml.Behaviors/Media/StoryboardAction.cs
48 12 1
private void AssociatedObject_LayoutUpdated()
in src/Microsoft.Xaml.Behaviors/Layout/FluidMoveBehavior.cs
46 11 2
internal void ApplyTranslationTransform()
in src/Microsoft.Xaml.Behaviors/Layout/MouseDragElementBehavior.cs
46 7 2
private void ApplyTranslation()
in src/Microsoft.Xaml.Behaviors/Layout/MouseDragElementBehavior.cs
45 8 2
private object IncrementCurrentValue()
in src/Microsoft.Xaml.Behaviors/Core/ChangePropertyAction.cs
44 9 1
private static Dictionary GetOldOpacities()
in src/Microsoft.Xaml.Behaviors/Core/ExtendedVisualStateManager.cs
43 13 5