I am testing my Zewo 0.3 Project with Zewo 0.5
OSX El Capitan. Using bash, each snapshot installed
Using 0.3 with DEVELOPMENT-SNAPSHOT-2016-02-08-a
Using 0.5 with DEVELOPMENT-SNAPSHOT-2016-04-12-a
Both make it build and run
using ResultBoxes; | |
namespace OpenAttendanceManagement.Common.EventSourcing; | |
public interface IAggregatePayload; | |
public record EmptyAggregatePayload : IAggregatePayload; | |
public record Aggregate<TAggregatePayload>(Guid AggregateId, int Version, TAggregatePayload Payload) | |
where TAggregatePayload : IAggregatePayload; | |
public interface IAggregateProjector | |
{ | |
public static abstract Func<IAggregatePayload, IEvent, IAggregatePayload> Projector(); |
using ResultBoxes; | |
namespace OpenAttendanceManagement.Common.EventSourcing; | |
public interface IAggregatePayload; | |
public record EmptyAggregatePayload : IAggregatePayload; | |
public record Aggregate<TAggregatePayload>(Guid AggregateId, int Version, TAggregatePayload Payload) | |
where TAggregatePayload : IAggregatePayload; | |
public interface IAggregateProjector | |
{ | |
public static abstract Func<IAggregatePayload, IEvent, IAggregatePayload> Projector(); |
public static class GeneralTypeExtensions | |
{ | |
public static dynamic CreateDefaultInstance(this Type type) | |
{ | |
if (type == typeof(string)) | |
{ | |
return ""; | |
} | |
if (type == typeof(char[])) | |
{ |
[JsonDerivedType(typeof(UnverifiedEmail), nameof(UnverifiedEmail))] | |
[JsonDerivedType(typeof(VerifiedEmail), nameof(VerifiedEmail))] | |
public interface IUserEmail; | |
public record UnverifiedEmail(string Value) : IUserEmail; | |
public record VerifiedEmail(string Value) : IUserEmail; | |
public record User(string Name, IUserEmail Email); | |
public class UserEmailTest | |
{ | |
private readonly ITestOutputHelper _testOutputHelper; |
// Change below parameters to match your Environment | |
struct Constants: ConnectionOption { | |
var host: String = "127.0.0.1" | |
var port: Int = 3306 | |
var user: String = "root" | |
var password: String = "CHANGE_TO_YOUR_PASSWORD" | |
var database: String = "CHANGE_TO_YOUR_PASSWORD" | |
var encoding: MySQL.Connection.Encoding = .UTF8MB4 | |
var timeZone: MySQL.Connection.TimeZone = MySQL.Connection.TimeZone(GMTOffset: 60 * 60 * 9) // JST |
#ifdef DEBUG | |
//# define LOG(...) NSLog(@"%@", __VA_ARGS__) | |
//# define LOG_METHOD NSLog(@"%s", __func__) | |
//# define LOG_FORMAT(...) NSLog(__VA_ARGS__) | |
# define LOG(...) ; | |
# define LOG_METHOD ; | |
# define LOG_FORMAT(...) ; | |
#else | |
# define LOG(...) ; |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
self.view.translatesAutoresizingMaskIntoConstraints = NO; | |
if (self.traitCollection.userInterfaceIdiom == UIUserInterfaceIdiomPad) { | |
self.portraitHeightRate = [UIScreen mainScreen].bounds.size.width * .4 / [UIScreen mainScreen].bounds.size.height; | |
}else{ | |
if (([UIScreen mainScreen].bounds.size.width + [UIScreen mainScreen].bounds.size.height)>1100) { | |
self.portraitHeightRate = [UIScreen mainScreen].bounds.size.width * .6 / [UIScreen mainScreen].bounds.size.height; | |
} else if (([UIScreen mainScreen].bounds.size.width + [UIScreen mainScreen].bounds.size.height)>950) { | |
self.portraitHeightRate = [UIScreen mainScreen].bounds.size.width * .75 / [UIScreen mainScreen].bounds.size.height; |
#import <UIKit/UIKit.h> | |
@interface UIViewController (JTCAddition) | |
+(instancetype) viewControllerFromSameNameStoryboard; | |
+(UINavigationController*) viewControllerFromSameNameStoryboardInNavigationController; | |
@end |
+(NSAttributedString*)attributedStringFromString:(NSString*)string font:(UIFont*)font color:(UIColor*)color{ | |
if (string==nil || ![string isKindOfClass:[NSString class]]) { | |
return [[NSAttributedString alloc] initWithString:@"" attributes:@{NSFontAttributeName:font,NSForegroundColorAttributeName:color}]; | |
} | |
NSMutableAttributedString * attrib = [[NSMutableAttributedString alloc] initWithString:string attributes:@{NSFontAttributeName:font,NSForegroundColorAttributeName:color}]; | |
NSArray * array = [TwitterText entitiesInText:attrib.string]; | |
[array enumerateObjectsUsingBlock:^(TwitterTextEntity * obj, NSUInteger idx, BOOL *stop) { | |
if (obj.type==TwitterTextEntityURL) { | |
NSURL * url = [NSURL URLWithString:[string substringWithRange:obj.range]]; | |
if (url) { |