private static int CompareRequestCode( [NotNull] RequestCodeItem targetViewRequestCode, [NotNull] Type targetViewType, [NotNull] Type proxyType) { var comparisonResult = string.CompareOrdinal(targetViewType.Name, targetViewRequestCode.TargetViewType.Name); if (comparisonResult == 0) { comparisonResult = string.CompareOrdinal(proxyType.Name, targetViewRequestCode.HandleViewModelResultProxy.GetType().Name); } return(comparisonResult); }
private static bool TryAddRequestCode( [NotNull] RequestCodeItem[] targetViewsRequestCodes, int requestCodeValue, [NotNull] Type targetViewType, [NotNull] Func <IHandleViewModelResultProxy> handleViewModelResultProxyFactory) { if (targetViewsRequestCodes[requestCodeValue] == null) { targetViewsRequestCodes[requestCodeValue] = new RequestCodeItem( requestCodeValue, targetViewType, handleViewModelResultProxyFactory().NotNull()); return(true); } return(false); }