Skip to content

make TriggerBase to "public" #7472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1874,16 +1874,18 @@ void System.Collections.IList.Remove(object value) { }
[System.Windows.LocalizabilityAttribute(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public abstract partial class TriggerBase : System.Windows.DependencyObject
{
internal TriggerBase() { }
public TriggerBase() { }
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public System.Windows.TriggerActionCollection EnterActions { get { throw null; } }
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public System.Windows.TriggerActionCollection ExitActions { get { throw null; } }
public virtual bool GetCurrentState(DependencyObject container, UncommonField<HybridDictionary[]> dataField) { throw null; }
public TriggerCondition[] TriggerConditions { get { throw null; } set { throw null; } }
}
[System.Windows.LocalizabilityAttribute(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public sealed partial class TriggerCollection : System.Collections.ObjectModel.Collection<System.Windows.TriggerBase>
{
internal TriggerCollection() { }
public TriggerCollection() { }
public bool IsSealed { get { throw null; } }
protected override void ClearItems() { }
protected override void InsertItem(int index, System.Windows.TriggerBase item) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5836,11 +5836,11 @@ public override int GetHashCode()
// Conditions set on [Multi]Trigger are stored
// in structures of this kind
//
internal struct TriggerCondition
public struct TriggerCondition
{
#region Construction

internal TriggerCondition(DependencyProperty dp, LogicalOp logicalOp, object value, string sourceName)
public TriggerCondition(DependencyProperty dp, LogicalOp logicalOp, object value, string sourceName)
{
Property = dp;
Binding = null;
Expand All @@ -5851,13 +5851,13 @@ internal TriggerCondition(DependencyProperty dp, LogicalOp logicalOp, object val
BindingValueCache = new BindingValueCache(null, null);
}

internal TriggerCondition(BindingBase binding, LogicalOp logicalOp, object value) :
public TriggerCondition(BindingBase binding, LogicalOp logicalOp, object value) :
this(binding, logicalOp, value, StyleHelper.SelfName)
{
// Call Forwarded
}

internal TriggerCondition(BindingBase binding, LogicalOp logicalOp, object value, string sourceName)
public TriggerCondition(BindingBase binding, LogicalOp logicalOp, object value, string sourceName)
{
Property = null;
Binding = binding;
Expand All @@ -5869,7 +5869,7 @@ internal TriggerCondition(BindingBase binding, LogicalOp logicalOp, object value
}

// Check for match
internal bool Match(object state)
public bool Match(object state)
{
return Match(state, Value);
}
Expand All @@ -5888,7 +5888,7 @@ private bool Match(object state, object referenceValue)

// Check for match, after converting the reference value to the type
// of the state value. (Used by data triggers)
internal bool ConvertAndMatch(object state)
public bool ConvertAndMatch(object state)
{
// convert the reference value to the type of 'state',
// provided the reference value is a string and the
Expand Down Expand Up @@ -5958,7 +5958,7 @@ internal bool ConvertAndMatch(object state)

// Implemented for #1038821, FxCop ConsiderOverridingEqualsAndOperatorEqualsOnValueTypes
// Called from ChildValueLookup.Equals, avoid boxing by not using the generic object-based Equals.
internal bool TypeSpecificEquals( TriggerCondition value )
public bool TypeSpecificEquals( TriggerCondition value )
{
if( Property == value.Property &&
Binding == value.Binding &&
Expand All @@ -5973,12 +5973,12 @@ internal bool TypeSpecificEquals( TriggerCondition value )

#endregion Construction

internal readonly DependencyProperty Property;
internal readonly BindingBase Binding;
public readonly DependencyProperty Property;
public readonly BindingBase Binding;
internal readonly LogicalOp LogicalOp;
internal readonly object Value;
internal readonly string SourceName;
internal int SourceChildIndex;
public int SourceChildIndex;
internal BindingValueCache BindingValueCache;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace System.Windows
[Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)]
public abstract class TriggerBase : DependencyObject
{
internal TriggerBase()
public TriggerBase()
{
}

Expand Down Expand Up @@ -374,7 +374,7 @@ internal void EstablishLayer()
}

// evaluate the current state of the trigger
internal virtual bool GetCurrentState(DependencyObject container, UncommonField<HybridDictionary[]> dataField)
public virtual bool GetCurrentState(DependencyObject container, UncommonField<HybridDictionary[]> dataField)
{
Debug.Assert( false,
"This method was written to handle Trigger, MultiTrigger, DataTrigger, and MultiDataTrigger. It looks like a new trigger type was added - please add support as appropriate.");
Expand All @@ -383,7 +383,7 @@ internal virtual bool GetCurrentState(DependencyObject container, UncommonField<
}

// Collection of TriggerConditions
internal TriggerCondition[] TriggerConditions
public TriggerCondition[] TriggerConditions
{
get { return _triggerConditions; }
set { _triggerConditions = value; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1863,16 +1863,18 @@ void System.Collections.IList.Remove(object value) { }
[System.Windows.LocalizabilityAttribute(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public abstract partial class TriggerBase : System.Windows.DependencyObject
{
internal TriggerBase() { }
public TriggerBase() { }
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public System.Windows.TriggerActionCollection EnterActions { get { throw null; } }
[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)]
public System.Windows.TriggerActionCollection ExitActions { get { throw null; } }
public virtual bool GetCurrentState(DependencyObject container, UncommonField<HybridDictionary[]> dataField) { throw null; }
public TriggerCondition[] TriggerConditions { get { throw null; } set { throw null; } }
}
[System.Windows.LocalizabilityAttribute(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public sealed partial class TriggerCollection : System.Collections.ObjectModel.Collection<System.Windows.TriggerBase>
{
internal TriggerCollection() { }
public TriggerCollection() { }
public bool IsSealed { get { throw null; } }
protected override void ClearItems() { }
protected override void InsertItem(int index, System.Windows.TriggerBase item) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace System.Windows
///
/// </summary>
[FriendAccessAllowed] // Built into Base, used by Core and Framework
internal class UncommonField<T>
public class UncommonField<T>
{
/// <summary>
/// Create a new UncommonField.
Expand Down