This file contains hidden or 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.Collections; | |
| using System.Linq; | |
| using System.Reflection; | |
| namespace Std.Utility | |
| { | |
| public static class ObjectHelpers | |
| { | |
| /// <summary> |
This file contains hidden or 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
| [100%] Built target cxx | |
| Scanning dependencies of target check-libcxx | |
| [100%] Running libcxx tests | |
| lit.py: lit.cfg:42: note: Using configuration variant: libcxx | |
| lit.py: config.py:652: note: inferred target_triple as: 'armv7l-unknown-linux-gnueabihf' | |
| lit.py: config.py:208: note: inferred use_system_cxx_lib as: False | |
| lit.py: config.py:219: note: inferred use_clang_verify as: True | |
| lit.py: config.py:300: note: inferred language dialect as: c++1z | |
| lit.py: target_info.py:66: warning: The locale fr_FR.UTF-8 is not supported by your platform. Some tests will be unsupported. | |
| lit.py: target_info.py:66: warning: The locale ru_RU.UTF-8 is not supported by your platform. Some tests will be unsupported. |
This file contains hidden or 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
| abstract class ArrayTrait | |
| { | |
| public abstract int Dimensions { get; } | |
| } | |
| class TwoDimensionalArrayTrait : ArrayTrait | |
| { | |
| public override int Dimensions { get; } => 2; | |
| } |
This file contains hidden or 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 Thing | |
| { | |
| public int Whatever{get;set;} | |
| } | |
| public interface IFoo | |
| { | |
| int DoSomething(int a, int b); | |
| } |
This file contains hidden or 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
| ulong x = 547978988; | |
| ulong mask = 0x8000000000000000; | |
| var sb = new StringBuilder(); | |
| var oneSeen = false; | |
| while (mask > 0) | |
| { | |
| var bit = (x & mask) != 0; | |
| if (!oneSeen && bit) |
This file contains hidden or 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
| ulong x = 289; | |
| char[] octalDigits = { '0', '1', '2', '3', '4', '5', '6', '7'}; | |
| var sb = new StringBuilder(); | |
| ulong digitIndex; | |
| while (x > 0) | |
| { | |
| digitIndex = x % 8; |
This file contains hidden or 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.Runtime.InteropServices; | |
| namespace Std.ServiceFramework.Communication | |
| { | |
| [StructLayout(LayoutKind.Sequential)] | |
| internal struct MethodCallHeader | |
| { | |
| public uint Version; | |
| public MethodCallOptions Options; | |
| public ulong InterfaceId; |
This file contains hidden or 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
| namespace Std.ServiceFramework.Communication | |
| { | |
| internal enum PacketSignature : uint | |
| { | |
| Valid = 0x42424242, | |
| Failover = 0x43434343 | |
| } | |
| [StructLayout(LayoutKind.Sequential)] | |
| internal struct MessagePacketHeader |
This file contains hidden or 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.ComponentModel; | |
| using System.Runtime.CompilerServices; | |
| namespace Std | |
| { | |
| public class ForwardingBinder<TPropertyType> : INotifyPropertyChanged | |
| { | |
| private readonly Func<TPropertyType> _getter; | |
| private readonly Action<TPropertyType> _setter; |
This file contains hidden or 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.Generic; | |
| using System.ComponentModel; | |
| using System.Runtime.CompilerServices; | |
| namespace Std | |
| { | |
| public class DictionaryBinder : INotifyPropertyChanged | |
| { | |
| public event PropertyChangedEventHandler PropertyChanged; |