-
-
Save JonDouglas/95634b9e8e6e02879470852c34a51857 to your computer and use it in GitHub Desktop.
MvvmCross LinkerPleaseInclude.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkerPleaseInclude | |
{ | |
public void Include(Button button) | |
{ | |
button.Click += (s, e) => button.Text = button.Text + ""; | |
} | |
public void Include(CheckBox checkBox) | |
{ | |
checkBox.CheckedChange += (sender, args) => checkBox.Checked = !checkBox.Checked; | |
} | |
public void Include(Switch @switch) | |
{ | |
@switch.CheckedChange += (sender, args) => @switch.Checked = !@switch.Checked; | |
} | |
public void Include(View view) | |
{ | |
view.Click += (s, e) => view.ContentDescription = view.ContentDescription + ""; | |
} | |
public void Include(TextView text) | |
{ | |
text.AfterTextChanged += (sender, args) => text.Text = "" + text.Text; | |
text.Hint = "" + text.Hint; | |
} | |
public void Include(CheckedTextView text) | |
{ | |
text.AfterTextChanged += (sender, args) => text.Text = "" + text.Text; | |
text.Hint = "" + text.Hint; | |
} | |
public void Include(CompoundButton cb) | |
{ | |
cb.CheckedChange += (sender, args) => cb.Checked = !cb.Checked; | |
} | |
public void Include(SeekBar sb) | |
{ | |
sb.ProgressChanged += (sender, args) => sb.Progress = sb.Progress + 1; | |
} | |
public void Include(RadioGroup radioGroup) | |
{ | |
radioGroup.CheckedChange += (sender, args) => radioGroup.Check(args.CheckedId); | |
} | |
public void Include(RadioButton radioButton) | |
{ | |
radioButton.CheckedChange += (sender, args) => radioButton.Checked = args.IsChecked; | |
} | |
public void Include(RatingBar ratingBar) | |
{ | |
ratingBar.RatingBarChange += (sender, args) => ratingBar.Rating = 0 + ratingBar.Rating; | |
} | |
public void Include(Activity act) | |
{ | |
act.Title = act.Title + ""; | |
} | |
public void Include(INotifyCollectionChanged changed) | |
{ | |
changed.CollectionChanged += (s, e) => { var test = $"{e.Action}{e.NewItems}{e.NewStartingIndex}{e.OldItems}{e.OldStartingIndex}"; }; | |
} | |
public void Include(ICommand command) | |
{ | |
command.CanExecuteChanged += (s, e) => { if (command.CanExecute(null)) command.Execute(null); }; | |
} | |
public void Include(MvvmCross.Platform.IoC.MvxPropertyInjector injector) | |
{ | |
injector = new MvvmCross.Platform.IoC.MvxPropertyInjector(); | |
} | |
public void Include(System.ComponentModel.INotifyPropertyChanged changed) | |
{ | |
changed.PropertyChanged += (sender, e) => { | |
var test = e.PropertyName; | |
}; | |
} | |
public void Include(MvxTaskBasedBindingContext context) | |
{ | |
context.Dispose(); | |
var context2 = new MvxTaskBasedBindingContext(); | |
context2.Dispose(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkerPleaseInclude | |
{ | |
public void Include(Button button) | |
{ | |
button.Click += (s, e) => button.Text = button.Text + ""; | |
} | |
public void Include(CheckBox checkBox) | |
{ | |
checkBox.CheckedChange += (sender, args) => checkBox.Checked = !checkBox.Checked; | |
} | |
public void Include(Switch @switch) | |
{ | |
@switch.CheckedChange += (sender, args) => @switch.Checked = !@switch.Checked; | |
} | |
public void Include(View view) | |
{ | |
view.Click += (s, e) => view.ContentDescription = view.ContentDescription + ""; | |
} | |
public void Include(TextView text) | |
{ | |
text.TextChanged += (sender, args) => text.Text = "" + text.Text; | |
text.Hint = "" + text.Hint; | |
} | |
public void Include(CheckedTextView text) | |
{ | |
text.TextChanged += (sender, args) => text.Text = "" + text.Text; | |
text.Hint = "" + text.Hint; | |
} | |
public void Include(CompoundButton cb) | |
{ | |
cb.CheckedChange += (sender, args) => cb.Checked = !cb.Checked; | |
} | |
public void Include(SeekBar sb) | |
{ | |
sb.ProgressChanged += (sender, args) => sb.Progress = sb.Progress + 1; | |
} | |
public void Include(Activity act) | |
{ | |
act.Title = act.Title + ""; | |
} | |
public void Include(INotifyCollectionChanged changed) | |
{ | |
changed.CollectionChanged += (s, e) => | |
{ | |
var test = $"{e.Action}{e.NewItems}{e.NewStartingIndex}{e.OldItems}{e.OldStartingIndex}"; | |
GC.KeepAlive(test); | |
}; | |
} | |
public void Include(ICommand command) | |
{ | |
command.CanExecuteChanged += (s, e) => { if (command.CanExecute(null)) command.Execute(null); }; | |
} | |
public void Include(MvvmCross.Platform.IoC.MvxPropertyInjector injector) | |
{ | |
injector = new MvvmCross.Platform.IoC.MvxPropertyInjector(); | |
GC.KeepAlive(injector); | |
} | |
public void Include(System.ComponentModel.INotifyPropertyChanged changed) | |
{ | |
changed.PropertyChanged += (sender, e) => | |
{ | |
var test = e.PropertyName; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment