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
using System; | |
using System.Globalization; | |
using Xamarin.Forms; | |
namespace Av_Planner_Demo.Controls.Converters | |
{ | |
public class DatePickerConverter : IValueConverter | |
{ | |
DateTime _timePickerDate; |
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 MinimalContainer | |
{ | |
private readonly Dictionary<Type, Type> types = new Dictionary<Type, Type>(); | |
public void Register<TInterface, TImplementation>() where TImplementation : TInterface | |
{ | |
types[typeof(TInterface)] = typeof(TImplementation); | |
} | |
public TInterface Create() |
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 IEnumerable<LicenseType> LicenseTypes => | |
Enum.GetValues(typeof(LicenseType)) | |
.Cast<LicenseType>(); | |
public LicenseType SelectedLicenseType | |
{ | |
get => _selectedLicenseType; | |
set | |
{ | |
_selectedLicenseType = value; |
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
var properties = typeof(Phrase).GetProperties(); | |
foreach (var prop in properties) | |
{ | |
Console.Write(prop.GetValue(document) + " | "); | |
} |
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
using Godot; | |
public class ThrowingObject : Area2D | |
{ | |
[Export()]float _throwDistance = 400; | |
[Export()]float _throwHeight = 400f; | |
Vector2 _startPos; | |
Vector2 _endPos; | |
float _radius; |
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
using System.Collections.ObjectModel; | |
/// <summary> | |
/// Represents a year and a month | |
/// </summary> | |
public struct YearMonth : IComparable<YearMonth> | |
{ | |
public YearMonth(int year, int month) | |
{ | |
if (year < 1900 || year > 9999) |
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 FilePath | |
{ | |
public FilePath(string fullPath) | |
{ | |
FullPath = fullPath; | |
} | |
public string FullPath { get; } | |
public string FileName => Path.GetFileName(FullPath); |