conflict_resolution
stringlengths
27
16k
<<<<<<< private const string integrationsPrefix = "/integrations/api/v1/"; ======= private const string syncApiPrefix = "/"; >>>>>>> private const string syncApiPrefix = "/"; private const string integrationsPrefix = "/integrations/api/v1/"; <<<<<<< public static Uri ForIntegrations(ApiEnvironment environment) => forEnvironment(environment, integrationsPrefix); ======= public static Uri ForSyncServer(ApiEnvironment environment) => selectByEnvironment( environment, staging: new Uri("https://sync.toggl.space"), production: new Uri("https://sync.toggl.com")); >>>>>>> public static Uri ForSyncServer(ApiEnvironment environment) => selectByEnvironment( environment, staging: new Uri("https://sync.toggl.space"), production: new Uri("https://sync.toggl.com")); public static Uri ForIntegrations(ApiEnvironment environment) => forEnvironment(environment, integrationsPrefix);
<<<<<<< using Toggl.Foundation.MvvmCross.ViewModels.ReportsCalendar; using Toggl.Foundation.MvvmCross.ViewModels.ReportsCalendar.QuickSelectShortcuts; ======= using Toggl.Foundation.MvvmCross.ViewModels.Calendar; using Toggl.Foundation.MvvmCross.ViewModels.Calendar.QuickSelectShortcuts; using Toggl.Foundation.Services; >>>>>>> using Toggl.Foundation.MvvmCross.ViewModels.ReportsCalendar; using Toggl.Foundation.MvvmCross.ViewModels.ReportsCalendar.QuickSelectShortcuts; using Toggl.Foundation.Services; <<<<<<< private void quickSelect(ReportsCalendarBaseQuickSelectShortcut quickSelectShortCut) => changeDateRange(quickSelectShortCut.GetDateRange()); ======= private void quickSelect(CalendarBaseQuickSelectShortcut quickSelectShortCut) { intentDonationService.DonateShowReport(quickSelectShortCut.Period); changeDateRange(quickSelectShortCut.GetDateRange()); } >>>>>>> private void quickSelect(ReportsCalendarBaseQuickSelectShortcut quickSelectShortCut) { intentDonationService.DonateShowReport(quickSelectShortCut.Period); changeDateRange(quickSelectShortCut.GetDateRange()); }
<<<<<<< using Toggl.Core.Services; using Toggl.Core.Sync; using Toggl.Core.UI.Helper; ======= >>>>>>> using Toggl.Core.Services; using Toggl.Core.Sync; using Toggl.Core.UI.Helper; <<<<<<< IRxActionFactory rxActionFactory, IPermissionsChecker permissionsChecker, IBackgroundService backgroundService) ======= IRxActionFactory rxActionFactory, IPlatformInfo platformInfo) >>>>>>> IRxActionFactory rxActionFactory, IPermissionsChecker permissionsChecker, IBackgroundService backgroundService, IPlatformInfo platformInfo) <<<<<<< Ensure.Argument.IsNotNull(permissionsChecker, nameof(permissionsChecker)); Ensure.Argument.IsNotNull(backgroundService, nameof(backgroundService)); ======= Ensure.Argument.IsNotNull(platformInfo, nameof(platformInfo)); >>>>>>> Ensure.Argument.IsNotNull(permissionsChecker, nameof(permissionsChecker)); Ensure.Argument.IsNotNull(backgroundService, nameof(backgroundService)); Ensure.Argument.IsNotNull(platformInfo, nameof(platformInfo)); <<<<<<< SuggestionsViewModel = new SuggestionsViewModel(dataSource, interactorFactory, onboardingStorage, schedulerProvider, rxActionFactory, analyticsService, timeService, permissionsChecker, navigationService, backgroundService, userPreferences, syncManager); RatingViewModel = new RatingViewModel(timeService, dataSource, ratingService, analyticsService, onboardingStorage, navigationService, schedulerProvider, rxActionFactory); TimeEntriesViewModel = new TimeEntriesViewModel(dataSource, syncManager, interactorFactory, analyticsService, schedulerProvider, rxActionFactory, timeService); ======= SuggestionsViewModel = new SuggestionsViewModel(interactorFactory, onboardingStorage, suggestionProviders, schedulerProvider, rxActionFactory, navigationService); RatingViewModel = new RatingViewModel(timeService, ratingService, analyticsService, onboardingStorage, navigationService, schedulerProvider, rxActionFactory); TimeEntriesViewModel = new TimeEntriesViewModel(dataSource, interactorFactory, analyticsService, schedulerProvider, rxActionFactory, timeService); >>>>>>> SuggestionsViewModel = new SuggestionsViewModel(interactorFactory, onboardingStorage, schedulerProvider, rxActionFactory, analyticsService, timeService, permissionsChecker, navigationService, backgroundService, userPreferences, syncManager); RatingViewModel = new RatingViewModel(timeService, ratingService, analyticsService, onboardingStorage, navigationService, schedulerProvider, rxActionFactory); TimeEntriesViewModel = new TimeEntriesViewModel(dataSource, interactorFactory, analyticsService, schedulerProvider, rxActionFactory, timeService);
<<<<<<< Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier) .Accepts(AcceptedCharactersInternal.NonWhiteSpace) .With(new DirectiveTokenChunkGenerator(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First())), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None), ======= Factory.MetaCode("section").Accepts(AcceptedCharacters.None), Factory.Span(SpanKind.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.WhiteSpace), Factory.Span(SpanKind.Code, "Header", CSharpSymbolType.Identifier) .AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKind.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharacters.None), >>>>>>> Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier) .AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None), <<<<<<< Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier) .Accepts(AcceptedCharactersInternal.NonWhiteSpace) .With(new DirectiveTokenChunkGenerator(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First())), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None), ======= Factory.MetaCode("section").Accepts(AcceptedCharacters.None), Factory.Span(SpanKind.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.WhiteSpace), Factory.Span(SpanKind.Code, "Header", CSharpSymbolType.Identifier).AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKind.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharacters.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharacters.None), >>>>>>> Factory.MetaCode("section").Accepts(AcceptedCharactersInternal.None), Factory.Span(SpanKindInternal.Code, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.WhiteSpace), Factory.Span(SpanKindInternal.Code, "Header", CSharpSymbolType.Identifier).AsDirectiveToken(CSharpCodeParser.SectionDirectiveDescriptor.Tokens.First()), Factory.Span(SpanKindInternal.Markup, " ", CSharpSymbolType.WhiteSpace).Accepts(AcceptedCharactersInternal.AllWhiteSpace), Factory.MetaCode("{").AutoCompleteWith("}", atEndOfSpan: true).Accepts(AcceptedCharactersInternal.None),
<<<<<<< public static IObservable<bool> FocusChanged(this IReactive<TextView> reactive) => Observable .FromEventPattern<FocusChangeEventArgs>(e => reactive.Base.FocusChange += e, e => reactive.Base.FocusChange -= e) .Select(args => ((EditText)args.Sender).HasFocus); ======= public static Action<string> Hint(this IReactive<TextView> reactive) => text => reactive.Base.Hint = text; >>>>>>> public static IObservable<bool> FocusChanged(this IReactive<TextView> reactive) => Observable .FromEventPattern<FocusChangeEventArgs>(e => reactive.Base.FocusChange += e, e => reactive.Base.FocusChange -= e) .Select(args => ((EditText)args.Sender).HasFocus); public static Action<string> Hint(this IReactive<TextView> reactive) => text => reactive.Base.Hint = text;
<<<<<<< "Microsoft.DotNet.Web.ProjectTemplates.5.0", ======= "Microsoft.DotNet.Web.ProjectTemplates.3.1", >>>>>>> "Microsoft.DotNet.Web.ProjectTemplates.3.1", "Microsoft.DotNet.Web.ProjectTemplates.5.0", <<<<<<< "Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0", ======= "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1", >>>>>>> "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1", "Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0",
<<<<<<< private ReportParameter parameter; ======= private BeginningOfWeek beginningOfWeek; >>>>>>> private ReportParameter parameter; private BeginningOfWeek beginningOfWeek;
<<<<<<< ======= protected override ISuggestionProviderContainer CreateSuggestionProviderContainer() => new SuggestionProviderContainer( new MostUsedTimeEntrySuggestionProvider(Database, TimeService, numberOfSuggestions) ); protected override IPushNotificationsTokenService CreatePushNotificationsTokenService() => new PushNotificationsTokenServiceAndroid(); >>>>>>> protected override IPushNotificationsTokenService CreatePushNotificationsTokenService() => new PushNotificationsTokenServiceAndroid();
<<<<<<< ======= using Toggl.Foundation.Tests.TestExtensions; using Toggl.Multivac; using Toggl.Multivac.Extensions; >>>>>>>
<<<<<<< DataSource.SyncManager.Received().ForceFullSync(); ======= TestScheduler.Start(); DataSource.Received().StartSyncing(); >>>>>>> TestScheduler.Start(); DataSource.SyncManager.Received().ForceFullSync();
<<<<<<< ======= public InputAction<TimeEntryViewModel> ContinueTimeEntry { get; } public InputAction<TimeEntryViewModel> SelectTimeEntry { get; } >>>>>>> <<<<<<< [Obsolete("Use RefreshAction RxAction instead")] public IMvxCommand RefreshCommand { get; } [Obsolete("Use SyncProgressState instead")] public SyncProgress SyncingProgress { get; private set; } [Obsolete("Use SyncProgressState instead")] [DependsOn(nameof(SyncingProgress))] public bool ShowSyncIndicator => SyncingProgress == SyncProgress.Syncing; public IMvxAsyncCommand OpenReportsCommand { get; } ======= >>>>>>> <<<<<<< RefreshCommand = new MvxCommand(Refresh); OpenReportsCommand = new MvxAsyncCommand(openReports); ======= >>>>>>>
<<<<<<< using Toggl.Core.Services; using System.Collections.Immutable; using Toggl.Core.Analytics; using System.Linq; using Toggl.Core.UI.Services; using Toggl.Core.UI.Navigation; using System.Reactive.Subjects; using Toggl.Core.Extensions; using Toggl.Core.Sync; ======= >>>>>>> using Toggl.Core.Services; using System.Collections.Immutable; using Toggl.Core.Analytics; using System.Linq; using Toggl.Core.UI.Services; using Toggl.Core.UI.Navigation; using System.Reactive.Subjects; using Toggl.Core.Extensions; using Toggl.Core.Sync; <<<<<<< private const int suggestionCount = 3; private static readonly TimeSpan recalculationThrottleDuration = TimeSpan.FromMilliseconds(500); ======= private readonly IRxActionFactory rxActionFactory; >>>>>>> private const int suggestionCount = 3; private static readonly TimeSpan recalculationThrottleDuration = TimeSpan.FromMilliseconds(500); <<<<<<< private readonly ITogglDataSource dataSource; private readonly IRxActionFactory rxActionFactory; private readonly IAnalyticsService analyticsService; private readonly ITimeService timeService; private readonly IPermissionsChecker permissionsChecker; private readonly IBackgroundService backgroundService; private readonly IUserPreferences userPreferences; private readonly ISyncManager syncManager; ======= private readonly ISuggestionProviderContainer suggestionProviders; >>>>>>> private readonly IRxActionFactory rxActionFactory; private readonly IAnalyticsService analyticsService; private readonly ITimeService timeService; private readonly IPermissionsChecker permissionsChecker; private readonly IBackgroundService backgroundService; private readonly IUserPreferences userPreferences; private readonly ISyncManager syncManager;
<<<<<<< new Lazy<IIntentDonationService>(() => IntentDonationService), new Lazy<IPrivateSharedStorageService>(() => PrivateSharedStorageService), new Lazy<IKeyValueStorage>(() => KeyValueStorage), new Lazy<IPushNotificationsTokenService>(() => PushNotificationsTokenService) ======= new Lazy<IPrivateSharedStorageService>(() => PrivateSharedStorageService) >>>>>>> new Lazy<IPrivateSharedStorageService>(() => PrivateSharedStorageService), new Lazy<IKeyValueStorage>(() => KeyValueStorage), new Lazy<IPushNotificationsTokenService>(() => PushNotificationsTokenService)
<<<<<<< // Feedback service is obsolete and is used only in the Android App and should be removed soon if (foundation.FeedbackService != null) { Mvx.RegisterSingleton(foundation.FeedbackService); } ======= Mvx.RegisterSingleton(foundation.PlatformInfo); >>>>>>> Mvx.RegisterSingleton(foundation.PlatformInfo); // Feedback service is obsolete and is used only in the Android App and should be removed soon if (foundation.FeedbackService != null) { Mvx.RegisterSingleton(foundation.FeedbackService); }
<<<<<<< ======= using MvvmCross.Plugin.Color.Platforms.Ios; >>>>>>> using Toggl.Daneel.Cells; <<<<<<< using CoreAnimation; using Toggl.Foundation.MvvmCross.Extensions; ======= using Toggl.Foundation; using Toggl.Foundation.Extensions; using Color = Toggl.Foundation.MvvmCross.Helper.Color; >>>>>>> using Toggl.Daneel.Extensions; using Toggl.Daneel.Extensions.Reactive; using Toggl.Foundation.MvvmCross.Extensions; using Toggl.Foundation.MvvmCross.ViewModels.Reports; using Toggl.Multivac.Extensions; using UIKit; <<<<<<< ======= private const int fontSize = 24; private const float barChartSpacingProportion = 0.3f; private static readonly UIColor normalColor = Color.Reports.PercentageActivated.ToNativeColor(); private static readonly UIColor disabledColor = Color.Reports.Disabled.ToNativeColor(); >>>>>>> <<<<<<< overview.Item = Item; barChart.Item = Item; ======= //Text Item.BillablePercentageObservable .Select(billableFormattedString) .Subscribe(BillablePercentageLabel.Rx().AttributedText()) .DisposedBy(disposeBag); Item.TotalTimeObservable .CombineLatest(Item.DurationFormatObservable, (totalTime, durationFormat) => totalTime.ToFormattedString(durationFormat)) .Subscribe(TotalDurationLabel.Rx().Text()) .DisposedBy(disposeBag); >>>>>>> overview.Item = Item; barChart.Item = Item; <<<<<<< ======= public override void LayoutSubviews() { base.LayoutSubviews(); updateLayout.OnNext(Unit.Default); } private void prepareViews() { prepareCard(OverviewCardView); prepareCard(BarChartCardView); TotalTitleLabel.SetKerning(-0.2); TotalDurationLabel.SetKerning(-0.2); BillableTitleLabel.SetKerning(-0.2); BillablePercentageLabel.SetKerning(-0.2); ClockedHoursTitleLabel.SetKerning(-0.2); BillableLegendLabel.SetKerning(-0.2); NonBillableLegendLabel.SetKerning(-0.2); } private void prepareCard(UIView view) { view.Layer.CornerRadius = 8; view.Layer.ShadowColor = UIColor.Black.CGColor; view.Layer.ShadowRadius = 16; view.Layer.ShadowOffset = new CGSize(0, 2); view.Layer.ShadowOpacity = 0.1f; } private IEnumerable<UIView> createBarViews(IEnumerable<BarViewModel> bars) => bars.Select<BarViewModel, UIView>(bar => { if (bar.NonBillablePercent == 0 && bar.BillablePercent == 0) { return new EmptyBarView(); } return new BarView(bar); }); private IEnumerable<UILabel> createHorizontalLegendLabels(IEnumerable<DateTimeOffset> dates, DateFormat format) => dates.Select(date => new BarLegendLabel( DateTimeOffsetConversion.ToDayOfWeekInitial(date), date.ToString(format.Short, CultureInfo.InvariantCulture))); >>>>>>> protected override void UpdateView() { overview.Item = Item; barChart.Item = Item; //Loading chart Item.IsLoadingObservable .Subscribe(LoadingPieChartView.Rx().IsVisibleWithFade()) .DisposedBy(disposeBag); //Pretty stuff Item.GroupedSegmentsObservable .Subscribe(groupedSegments => PieChartView.Segments = groupedSegments) .DisposedBy(disposeBag); Item.IsLoadingObservable .Select(CommonFunctions.Invert) .Subscribe(BarChartContainerView.Rx().IsVisible()) .DisposedBy(disposeBag); //Visibility Item.ShowEmptyStateObservable .Subscribe(EmptyStateView.Rx().IsVisible()) .DisposedBy(disposeBag); }
<<<<<<< public long Identifier => Id.GetHashCode(); public SelectableUserCalendarViewModel(UserCalendar calendar, bool initiallySelected) ======= public SelectableUserCalendarViewModel(UserCalendar calendar, bool selected) >>>>>>> public long Identifier => Id.GetHashCode(); public SelectableUserCalendarViewModel(UserCalendar calendar, bool selected)
<<<<<<< using Toggl.Core.UI; using Toggl.Storage; ======= >>>>>>> using Toggl.Core.UI; <<<<<<< using Toggl.Networking.Network; ======= using Toggl.Storage; >>>>>>> using Toggl.Storage;
<<<<<<< using System.Reactive.Disposables; ======= >>>>>>> <<<<<<< using CoreGraphics; using MvvmCross.Platforms.Ios.Views; ======= >>>>>>> using CoreGraphics; <<<<<<< private readonly CompositeDisposable disposeBag = new CompositeDisposable(); private ReportsCalendarCollectionViewSource calendarCollectionViewSource; ======= private List<ReportsCalendarPageViewModel> pendingMonthsUpdate; private ReportsCalendarCollectionViewSource calendarCollectionViewSource; >>>>>>> private List<ReportsCalendarPageViewModel> pendingMonthsUpdate; private ReportsCalendarCollectionViewSource calendarCollectionViewSource; <<<<<<< .DisposedBy(disposeBag); ViewModel.ReloadObservable .Select(_ => ViewModel.CurrentPage) .Subscribe(calendarCollectionViewSource.RefreshUIAtPage) .DisposedBy(disposeBag); ======= .DisposedBy(DisposeBag); >>>>>>> .DisposedBy(DisposeBag); ViewModel.ReloadObservable .Select(_ => ViewModel.CurrentPage) .Subscribe(calendarCollectionViewSource.RefreshUIAtPage) .DisposedBy(DisposeBag);
<<<<<<< public IAnalyticsEvent<OnboardingConditionKey, TooltipDismissReason> TooltipDismissed { get; } ======= public IAnalyticsEvent LoginWithSso { get; } public IAnalyticsEvent SsoFlowStarted { get; } public IAnalyticsEvent SsoUrlRequested { get; } public IAnalyticsEvent SsoLinkStarted { get; } public IAnalyticsEvent SsoLinkCancelled { get; } public IAnalyticsEvent<string> SsoUrlOutcome { get; } public IAnalyticsEvent<string> SsoFlowOutcome { get; } public IAnalyticsEvent<string> SsoLinkOutcome { get; } >>>>>>> public IAnalyticsEvent<OnboardingConditionKey, TooltipDismissReason> TooltipDismissed { get; } public IAnalyticsEvent LoginWithSso { get; } public IAnalyticsEvent SsoFlowStarted { get; } public IAnalyticsEvent SsoUrlRequested { get; } public IAnalyticsEvent SsoLinkStarted { get; } public IAnalyticsEvent SsoLinkCancelled { get; } public IAnalyticsEvent<string> SsoUrlOutcome { get; } public IAnalyticsEvent<string> SsoFlowOutcome { get; } public IAnalyticsEvent<string> SsoLinkOutcome { get; } <<<<<<< TooltipDismissed = new AnalyticsEvent<OnboardingConditionKey, TooltipDismissReason>(this, nameof(TooltipDismissed), "Tooltip", "Reason"); ======= LoginWithSso = new AnalyticsEvent(this, nameof(LoginWithSso)); SsoFlowStarted = new AnalyticsEvent(this, nameof(SsoFlowStarted)); SsoLinkStarted = new AnalyticsEvent(this, nameof(SsoLinkStarted)); SsoLinkCancelled = new AnalyticsEvent(this, nameof(SsoLinkCancelled)); SsoUrlRequested = new AnalyticsEvent(this, nameof(SsoUrlRequested)); SsoFlowOutcome = new AnalyticsEvent<string>(this, nameof(SsoFlowOutcome), "Outcome"); SsoLinkOutcome = new AnalyticsEvent<string>(this, nameof(SsoLinkOutcome), "Outcome"); SsoUrlOutcome = new AnalyticsEvent<string>(this, nameof(SsoUrlOutcome), "Outcome"); >>>>>>> TooltipDismissed = new AnalyticsEvent<OnboardingConditionKey, TooltipDismissReason>(this, nameof(TooltipDismissed), "Tooltip", "Reason"); LoginWithSso = new AnalyticsEvent(this, nameof(LoginWithSso)); SsoFlowStarted = new AnalyticsEvent(this, nameof(SsoFlowStarted)); SsoLinkStarted = new AnalyticsEvent(this, nameof(SsoLinkStarted)); SsoLinkCancelled = new AnalyticsEvent(this, nameof(SsoLinkCancelled)); SsoUrlRequested = new AnalyticsEvent(this, nameof(SsoUrlRequested)); SsoFlowOutcome = new AnalyticsEvent<string>(this, nameof(SsoFlowOutcome), "Outcome"); SsoLinkOutcome = new AnalyticsEvent<string>(this, nameof(SsoLinkOutcome), "Outcome"); SsoUrlOutcome = new AnalyticsEvent<string>(this, nameof(SsoUrlOutcome), "Outcome");
<<<<<<< public sealed class ReportsViewModel : ViewModel ======= public sealed class ReportsViewModel : ViewModelWithInput<ReportParameter> >>>>>>> public sealed class ReportsViewModel : ViewModel <<<<<<< private readonly IIntentDonationService intentDonationService; ======= private readonly IDialogService dialogService; >>>>>>> <<<<<<< IIntentDonationService intentDonationService, ======= IDialogService dialogService, >>>>>>> <<<<<<< ======= Ensure.Argument.IsNotNull(dialogService, nameof(dialogService)); >>>>>>> <<<<<<< ======= this.dialogService = dialogService; >>>>>>> <<<<<<< ======= public override void Prepare(ReportParameter parameter) { base.Prepare(); calendarViewModel.SelectPeriod(parameter.ReportPeriod); this.parameter = parameter; } >>>>>>> <<<<<<< workspace = await interactorFactory.GetDefaultWorkspace() ======= IInteractor<IObservable<IThreadSafeWorkspace>> workspaceInteractor; if (parameter?.WorkspaceId is long parameterWorkspaceId) { workspaceInteractor = interactorFactory.GetWorkspaceById(parameterWorkspaceId); } else { workspaceInteractor = interactorFactory.GetDefaultWorkspace(); } var workspace = await workspaceInteractor >>>>>>> IInteractor<IObservable<IThreadSafeWorkspace>> workspaceInteractor; if (parameter?.WorkspaceId is long parameterWorkspaceId) { workspaceInteractor = interactorFactory.GetWorkspaceById(parameterWorkspaceId); } else { workspaceInteractor = interactorFactory.GetDefaultWorkspace(); } var workspace = await workspaceInteractor
<<<<<<< => new ReportsCalendarViewModel(TimeService, DataSource, IntentDonationService, RxActionFactory, NavigationService); ======= => new ReportsCalendarViewModel(TimeService, DialogService, DataSource, RxActionFactory); >>>>>>> => new ReportsCalendarViewModel(TimeService, DataSource, RxActionFactory, NavigationService); <<<<<<< bool useIntentDonationService, bool useRxActionFactory, bool useNavigationService ======= bool useRxActionFactory >>>>>>> bool useRxActionFactory, bool useNavigationService <<<<<<< () => new ReportsCalendarViewModel(timeService, dataSource, intentDonationService, rxActionFactory, navigationService); ======= () => new ReportsCalendarViewModel(timeService, dialogService, dataSource, rxActionFactory); >>>>>>> () => new ReportsCalendarViewModel(timeService, dataSource, rxActionFactory, navigationService);
<<<<<<< ======= dependencyContainer.UpdateRemoteConfigCacheService, dependencyContainer.SuggestionProviderContainer, >>>>>>> dependencyContainer.UpdateRemoteConfigCacheService, <<<<<<< ======= dependencyContainer.UpdateRemoteConfigCacheService, dependencyContainer.SuggestionProviderContainer, >>>>>>> dependencyContainer.UpdateRemoteConfigCacheService,
<<<<<<< public virtual IObservable<IEnumerable<IConflictResolutionResult<TThreadsafe>>> OverwriteIfOriginalDidNotChange(TThreadsafe original, TThreadsafe entity) => Repository.UpdateWithConflictResolution(original.Id, entity, ignoreIfChangedLocally(original), RivalsResolver) .ToThreadSafeResult(Convert); ======= public virtual IObservable<IConflictResolutionResult<TThreadsafe>> OverwriteIfOriginalDidNotChange(TThreadsafe original, TThreadsafe entity) => repository.UpdateWithConflictResolution(original.Id, entity, ignoreIfChangedLocally(original), RivalsResolver) .Select(result => result.ToThreadSafeResult(Convert)); >>>>>>> public virtual IObservable<IEnumerable<IConflictResolutionResult<TThreadsafe>>> OverwriteIfOriginalDidNotChange(TThreadsafe original, TThreadsafe entity) => repository.UpdateWithConflictResolution(original.Id, entity, ignoreIfChangedLocally(original), RivalsResolver) .ToThreadSafeResult(Convert);
<<<<<<< ======= internal ISuggestionProviderContainer MockSuggestionProviderContainer { get; set; } protected override ISuggestionProviderContainer CreateSuggestionProviderContainer() => MockSuggestionProviderContainer; internal IPushNotificationsTokenService MockPushNotificationsTokenService { get; set; } protected override IPushNotificationsTokenService CreatePushNotificationsTokenService() => MockPushNotificationsTokenService; >>>>>>> internal IPushNotificationsTokenService MockPushNotificationsTokenService { get; set; } protected override IPushNotificationsTokenService CreatePushNotificationsTokenService() => MockPushNotificationsTokenService;
<<<<<<< IQuery<Unit> PersistExternalCalendarsData(Dictionary<IExternalCalendar, IEnumerable<IExternalCalendarEvent>> calendarData); ======= IQuery<Unit> ResetLocalState(Networking.Sync.Pull.IResponse response); >>>>>>> IQuery<Unit> ResetLocalState(Networking.Sync.Pull.IResponse response); IQuery<Unit> PersistExternalCalendarsData(Dictionary<IExternalCalendar, IEnumerable<IExternalCalendarEvent>> calendarData);
<<<<<<< var firstTimeOpenedFromMainTabBarStopwatch = stopwatchProvider.Get(MeasuredOperation.OpenReportsViewForTheFirstTime); stopwatchProvider.Remove(MeasuredOperation.OpenReportsViewForTheFirstTime); firstTimeOpenedFromMainTabBarStopwatch?.Stop(); firstTimeOpenedFromMainTabBarStopwatch = null; } public void StopNavigationFromMainLogStopwatch() { var navigationStopwatch = stopwatchProvider.Get(MeasuredOperation.OpenReportsFromGiskard); stopwatchProvider.Remove(MeasuredOperation.OpenReportsFromGiskard); navigationStopwatch?.Stop(); ======= reportSubject.OnNext(Unit.Default); >>>>>>> var firstTimeOpenedFromMainTabBarStopwatch = stopwatchProvider.Get(MeasuredOperation.OpenReportsViewForTheFirstTime); stopwatchProvider.Remove(MeasuredOperation.OpenReportsViewForTheFirstTime); firstTimeOpenedFromMainTabBarStopwatch?.Stop(); firstTimeOpenedFromMainTabBarStopwatch = null; reportSubject.OnNext(Unit.Default); } public void StopNavigationFromMainLogStopwatch() { var navigationStopwatch = stopwatchProvider.Get(MeasuredOperation.OpenReportsFromGiskard); stopwatchProvider.Remove(MeasuredOperation.OpenReportsFromGiskard); navigationStopwatch?.Stop();
<<<<<<< private TextView durationLabel; private Toolbar toolbar; ======= >>>>>>> private TextView durationLabel; <<<<<<< durationLabel = FindViewById<TextView>(Resource.Id.DurationLabel); toolbar = FindViewById<Toolbar>(Resource.Id.Toolbar); ======= SetupToolbar(title: Shared.Resources.StartAndStopTime); >>>>>>> durationLabel = FindViewById<TextView>(Resource.Id.DurationLabel); startLabel.Text = Shared.Resources.Start; stopLabel.Text = Shared.Resources.Stop; stopTimerLabel.Text = Shared.Resources.StopTimer; durationLabel.Text = Shared.Resources.Duration; SetupToolbar(title: Shared.Resources.StartAndStopTime);
<<<<<<< private readonly INotificationService notificationService; ======= private readonly IIntentDonationService intentDonationService; >>>>>>> private readonly INotificationService notificationService; private readonly IIntentDonationService intentDonationService; <<<<<<< INotificationService notificationService, ======= IIntentDonationService intentDonationService, >>>>>>> INotificationService notificationService, IIntentDonationService intentDonationService, <<<<<<< Ensure.Argument.IsNotNull(notificationService, nameof(notificationService)); ======= Ensure.Argument.IsNotNull(intentDonationService, nameof(intentDonationService)); >>>>>>> Ensure.Argument.IsNotNull(notificationService, nameof(notificationService)); Ensure.Argument.IsNotNull(intentDonationService, nameof(intentDonationService)); <<<<<<< this.notificationService = notificationService; ======= this.intentDonationService = intentDonationService; >>>>>>> this.notificationService = notificationService; this.intentDonationService = intentDonationService;
<<<<<<< ======= using Toggl.iOS.Presentation.Attributes; using Toggl.Shared; >>>>>>> using Toggl.Shared;
<<<<<<< IAnalyticsEvent<CalendarContextualMenuActionType> CalendarEventContextualMenu { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarNewTimeEntryContextualMenu { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarExistingTimeEntryContextualMenu { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarRunningTimeEntryContextualMenu { get; } IAnalyticsEvent<CalendarTimeEntryCreatedType, int, string> CalendarTimeEntryCreated { get; } IAnalyticsEvent<int, string> CalendarWeeklyDatePickerSelectionChanged { get; } IAnalyticsEvent<CalendarSwipeDirection, int, string> CalendarSingleSwipe { get; } ======= IAnalyticsEvent<bool> TimerWidgetInstallStateChange { get; } IAnalyticsEvent<bool> SuggestionsWidgetInstallStateChange { get; } IAnalyticsEvent<int> TimerWidgetSizeChanged { get; } >>>>>>> IAnalyticsEvent<bool> TimerWidgetInstallStateChange { get; } IAnalyticsEvent<bool> SuggestionsWidgetInstallStateChange { get; } IAnalyticsEvent<int> TimerWidgetSizeChanged { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarEventContextualMenu { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarNewTimeEntryContextualMenu { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarExistingTimeEntryContextualMenu { get; } IAnalyticsEvent<CalendarContextualMenuActionType> CalendarRunningTimeEntryContextualMenu { get; } IAnalyticsEvent<CalendarTimeEntryCreatedType, int, string> CalendarTimeEntryCreated { get; } IAnalyticsEvent<int, string> CalendarWeeklyDatePickerSelectionChanged { get; } IAnalyticsEvent<CalendarSwipeDirection, int, string> CalendarSingleSwipe { get; }
<<<<<<< public TimeEntriesViewModel( ITogglDataSource dataSource, IInteractorFactory interactorFactory, IAnalyticsService analyticsService, ISchedulerProvider schedulerProvider, IRxActionFactory rxActionFactory, ITimeService timeService) ======= public TimeEntriesViewModel (ITogglDataSource dataSource, ISyncManager syncManager, IInteractorFactory interactorFactory, IAnalyticsService analyticsService, ISchedulerProvider schedulerProvider, IRxActionFactory rxActionFactory) >>>>>>> public TimeEntriesViewModel( ITogglDataSource dataSource, ISyncManager syncManager, IInteractorFactory interactorFactory, IAnalyticsService analyticsService, ISchedulerProvider schedulerProvider, IRxActionFactory rxActionFactory, ITimeService timeService) <<<<<<< var observables = timeEntries.Select(timeEntryId => interactorFactory .DeleteTimeEntry(timeEntryId) .Execute() .Do(_ => { analyticsService.DeleteTimeEntry.Track(); dataSource.SyncManager.PushSync(); })); return observables.Merge().LastAsync().SelectValue(timeEntries); ======= return interactorFactory .DeleteTimeEntry(timeEntry.Id) .Execute() .Track(analyticsService.DeleteTimeEntry) .Do(syncManager.InitiatePushSync) .SelectValue(timeEntry); } private async Task fetchSectionedTimeEntries() { var groupedEntries = await interactorFactory.GetAllTimeEntriesVisibleToTheUser().Execute() .Select(entries => entries .Where(isNotRunning) .Where(timeEntry => timeEntry.Id != timeEntryToDelete?.Id) .Select(te => new TimeEntryViewModel(te, durationFormat)) ); TimeEntries.ReplaceWith(groupedEntries); } private void onTimeEntryUpdated(EntityUpdate<IThreadSafeTimeEntry> update) { var timeEntry = update.Entity; if (timeEntry == null) return; if (timeEntry.IsDeleted || timeEntry.IsRunning()) { onTimeEntryRemoved(timeEntry.Id); } else { var timeEntryViewModel = new TimeEntryViewModel(timeEntry, durationFormat); if (timeEntry.Id == timeEntryToDelete?.Id) { // Ignore this update because the entity is hidden and might be deleted unless the user // undoes the action. In that case bring the time entry but with the updated data. timeEntryToDelete = timeEntryViewModel; } else { TimeEntries.UpdateItem(update.Id, timeEntryViewModel); } } } private void onTimeEntryAdded(IThreadSafeTimeEntry timeEntry) { var timeEntryViewModel = new TimeEntryViewModel(timeEntry, durationFormat); TimeEntries.InsertItem(timeEntryViewModel); } private void onTimeEntryRemoved(long id) { var index = TimeEntries.IndexOf(id); if (index.HasValue) TimeEntries.RemoveItemAt(index.Value.Section, index.Value.Row); } private void onPreferencesChanged(IThreadSafePreferences preferences) { if (durationFormat != preferences.DurationFormat) { durationFormat = preferences.DurationFormat; var _ = fetchSectionedTimeEntries(); } >>>>>>> var observables = timeEntries.Select(timeEntryId => interactorFactory .DeleteTimeEntry(timeEntryId) .Execute() .Track(analyticsService.DeleteTimeEntry) .Do(syncManager.InitiatePushSync)); return observables.Merge().LastAsync().SelectValue(timeEntries);
<<<<<<< using Toggl.Daneel.Intents; using Toggl.Daneel.ViewControllers; using Toggl.Foundation; ======= using Toggl.Foundation; >>>>>>> using Toggl.Daneel.Intents; using Toggl.Daneel.ViewControllers; using Toggl.Foundation; <<<<<<< public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler) { var interaction = userActivity.GetInteraction(); if (interaction == null || interaction.IntentHandlingStatus != INIntentHandlingStatus.DeferredToApplication) { return false; } var intent = interaction?.Intent; switch (intent) { case StopTimerIntent _: navigationService.Navigate(ApplicationUrls.Main.StopTimeEntry); return true; case ShowReportIntent _: navigationService.Navigate(ApplicationUrls.Reports); return true; case ShowReportPeriodIntent periodIntent: var tabbarVC = (MainTabBarController)UIApplication.SharedApplication.KeyWindow.RootViewController; var reportViewModel = (ReportsViewModel)tabbarVC.ViewModel.ViewModels.Single(viewModel => viewModel is ReportsViewModel); navigationService.Navigate(reportViewModel, periodIntent.Period.ToReportPeriod()); return true; case StartTimerIntent startTimerIntent: var workspaceId = (long)Convert.ToDouble(startTimerIntent.Workspace.Identifier); var timeEntryParams = new StartTimeEntryParameters(DateTimeOffset.Now, "", null, workspaceId, startTimerIntent.EntryDescription ?? ""); navigationService.Navigate<MainViewModel>(); navigationService.Navigate<StartTimeEntryViewModel, StartTimeEntryParameters>(timeEntryParams); return true; default: return false; } } ======= public override void ApplicationSignificantTimeChange(UIApplication application) { timeService.SignificantTimeChanged(); } >>>>>>> public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler) { var interaction = userActivity.GetInteraction(); if (interaction == null || interaction.IntentHandlingStatus != INIntentHandlingStatus.DeferredToApplication) { return false; } var intent = interaction?.Intent; switch (intent) { case StopTimerIntent _: navigationService.Navigate(ApplicationUrls.Main.StopTimeEntry); return true; case ShowReportIntent _: navigationService.Navigate(ApplicationUrls.Reports); return true; case ShowReportPeriodIntent periodIntent: var tabbarVC = (MainTabBarController)UIApplication.SharedApplication.KeyWindow.RootViewController; var reportViewModel = (ReportsViewModel)tabbarVC.ViewModel.ViewModels.Single(viewModel => viewModel is ReportsViewModel); navigationService.Navigate(reportViewModel, periodIntent.Period.ToReportPeriod()); return true; case StartTimerIntent startTimerIntent: var workspaceId = (long)Convert.ToDouble(startTimerIntent.Workspace.Identifier); var timeEntryParams = new StartTimeEntryParameters(DateTimeOffset.Now, "", null, workspaceId, startTimerIntent.EntryDescription ?? ""); navigationService.Navigate<MainViewModel>(); navigationService.Navigate<StartTimeEntryViewModel, StartTimeEntryParameters>(timeEntryParams); return true; default: return false; } } public override void ApplicationSignificantTimeChange(UIApplication application) { timeService.SignificantTimeChanged(); }
<<<<<<< using Toggl.Foundation.Interactors; ======= using Toggl.Foundation.Models.Interfaces; >>>>>>> using Toggl.Foundation.Interactors; using Toggl.Foundation.Models.Interfaces; <<<<<<< private readonly IInteractorFactory interactorFactory; ======= private readonly IAnalyticsService analyticsService; >>>>>>> private readonly IInteractorFactory interactorFactory; private readonly IAnalyticsService analyticsService; <<<<<<< public ReportsViewModel(ITogglDataSource dataSource, ITimeService timeService, IMvxNavigationService navigationService, IInteractorFactory interactorFactory) ======= public ReportsViewModel( ITogglDataSource dataSource, ITimeService timeService, IMvxNavigationService navigationService, IAnalyticsService analyticsService ) >>>>>>> public ReportsViewModel(ITogglDataSource dataSource, ITimeService timeService, IMvxNavigationService navigationService, IInteractorFactory interactorFactory, IAnalyticsService analyticsService) <<<<<<< Ensure.Argument.IsNotNull(interactorFactory, nameof(interactorFactory)); ======= Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService)); >>>>>>> Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService)); Ensure.Argument.IsNotNull(interactorFactory, nameof(interactorFactory));
<<<<<<< public sealed partial class AppDelegate : MvxApplicationDelegate<Setup, App<OnboardingViewModel>>, IUNUserNotificationCenterDelegate, IMessagingDelegate ======= public sealed partial class AppDelegate : UIApplicationDelegate, IUNUserNotificationCenterDelegate >>>>>>> public sealed partial class AppDelegate : UIApplicationDelegate, IUNUserNotificationCenterDelegate, IMessagingDelegate <<<<<<< #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif return true; } protected override void RunAppStart(object hint = null) { base.RunAppStart(hint); ======= Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.MakeKeyAndVisible(); >>>>>>> Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.MakeKeyAndVisible(); <<<<<<< } #if USE_ANALYTICS public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options) { var openUrlOptions = new UIApplicationOpenUrlOptions(options); return Google.SignIn.SignIn.SharedInstance.HandleUrl(url, openUrlOptions.SourceApplication, openUrlOptions.Annotation); } #endif public override void ReceiveMemoryWarning(UIApplication application) { analyticsService.ReceivedLowMemoryWarning.Track(Platform.Daneel); } ======= >>>>>>>
<<<<<<< [Test] public void boolean_attr() { var tag = new HtmlTag("input").BooleanAttr("required"); tag.HasAttr("required").ShouldBeTrue(); } [Test] public void render_boolean_attr() { var tag = new HtmlTag("input").BooleanAttr("required"); tag.ToString().ShouldEqual("<input required />"); } ======= [Test] public void set_an_attribute_to_empty_string_should_not_remove_the_attribute() { var tag = new HtmlTag("div"); tag.Attr("name", "bill"); tag.HasAttr("name").ShouldBeTrue(); tag.Attr("name", string.Empty); tag.HasAttr("name").ShouldBeTrue(); } [Test] public void retrieve_an_empty_attr_should_return_an_empty_string() { var tag = new HtmlTag("option"); tag.Attr("value", string.Empty); tag.Attr("value").ShouldEqual(string.Empty); } [Test] public void render_empty_attr() { var tag = new HtmlTag("option").Attr("value", string.Empty); tag.ToString().ShouldEqual("<option value=\"\"></option>"); } >>>>>>> [Test] public void boolean_attr() { var tag = new HtmlTag("input").BooleanAttr("required"); tag.HasAttr("required").ShouldBeTrue(); } [Test] public void render_boolean_attr() { var tag = new HtmlTag("input").BooleanAttr("required"); tag.ToString().ShouldEqual("<input required />"); } public void set_an_attribute_to_empty_string_should_not_remove_the_attribute() { var tag = new HtmlTag("div"); tag.Attr("name", "bill"); tag.HasAttr("name").ShouldBeTrue(); tag.Attr("name", string.Empty); tag.HasAttr("name").ShouldBeTrue(); } [Test] public void retrieve_an_empty_attr_should_return_an_empty_string() { var tag = new HtmlTag("option"); tag.Attr("value", string.Empty); tag.Attr("value").ShouldEqual(string.Empty); } [Test] public void render_empty_attr() { var tag = new HtmlTag("option").Attr("value", string.Empty); tag.ToString().ShouldEqual("<option value=\"\"></option>"); }
<<<<<<< private readonly IAddressTranslator _addressTranslator; ======= private volatile Host _host; private volatile Connection _connection; >>>>>>> private readonly IAddressTranslator _addressTranslator; private volatile Host _host; private volatile Connection _connection; <<<<<<< private void Metadata_HostsEvent(object sender, HostsEventArgs e) { if (sender == this) return; if (_activeConnection.Value == null) return; Action<object> act = _ => SetupControlConnection(); var address = TranslateAddress(e.Address); if (e.What == HostsEventArgs.Kind.Down) { if (address.Equals(_activeConnection.Value.Address)) act.BeginInvoke(null, act.EndInvoke, null); } else if (e.What == HostsEventArgs.Kind.Up) { if (_isDisconnected) act.BeginInvoke(null, act.EndInvoke, null); } } /// <summary> /// Translates Cassandra node address. /// </summary> /// <param name="address">Source address.</param> /// <returns>Result address.</returns> private IPEndPoint TranslateAddress(IPEndPoint address) { return _addressTranslator.Translate(address) ?? address; } ======= >>>>>>> /// <summary> /// Translates Cassandra node address. /// </summary> /// <param name="address">Source address.</param> /// <returns>Result address.</returns> private IPEndPoint TranslateAddress(IPEndPoint address) { return _addressTranslator.Translate(address) ?? address; } <<<<<<< _cluster.Metadata.RemoveHost(address); SetupControlConnection(_activeConnection.Value != null && !address.Equals(_activeConnection.Value.Address)); ======= _cluster.Metadata.RemoveHost(tce.Address); SetupControlConnection(_connection != null && !tce.Address.Equals(_connection.Address)); >>>>>>> _cluster.Metadata.RemoveHost(tce.Address); SetupControlConnection(_connection != null && !tce.Address.Equals(_connection.Address)); <<<<<<< Host localhost = _cluster.Metadata.GetHost(_activeConnection.Value.Address); ======= Host localhost = _cluster.Metadata.GetHost(_connection.Address); >>>>>>> Host localhost = _cluster.Metadata.GetHost(_connection.Address); <<<<<<< var foundHostsSet = new HashSet<IPEndPoint>(foundHosts); foreach (IPEndPoint host in _cluster.Metadata.AllReplicas()) if (!host.Equals(_activeConnection.Value.Address) && !foundHostsSet.Contains(host)) ======= var foundHostsSet = new HashSet<IPAddress>(foundHosts); foreach (IPAddress host in _cluster.Metadata.AllReplicas()) if (!host.Equals(_connection.Address) && !foundHostsSet.Contains(host)) >>>>>>> var foundHostsSet = new HashSet<IPEndPoint>(foundHosts); foreach (var host in _cluster.Metadata.AllReplicas()) { if (!host.Equals(_connection.Address) && !foundHostsSet.Contains(host)) {
<<<<<<< using Cassandra.Tests; using NUnit.Framework; ======= using Cassandra.IntegrationTests.TestBase; using Cassandra.IntegrationTests.TestClusterManagement; using NUnit.Framework; >>>>>>> using Cassandra.IntegrationTests.TestBase; using Cassandra.IntegrationTests.TestClusterManagement; using Cassandra.Tests; using NUnit.Framework;
<<<<<<< Version = TestClusterManager.CassandraVersion.ToString(); DseVersion = TestClusterManager.IsDse ? TestClusterManager.DseVersion.ToString() : null; Name = TestUtils.GetTestClusterNameBasedOnTime(); ======= Version = TestClusterManager.CassandraVersionText; Name = TestUtils.GetTestClusterNameBasedOnRandomString(); >>>>>>> Version = TestClusterManager.CassandraVersion.ToString(); DseVersion = TestClusterManager.IsDse ? TestClusterManager.DseVersion.ToString() : null; Name = TestUtils.GetTestClusterNameBasedOnRandomString();
<<<<<<< _testCluster = TestClusterManager.GetTestCluster(3); _keyspace = _testCluster.DefaultKeyspace; _session = _testCluster.Session; try { _session.Execute(String.Format(TestUtils.CreateTableAllTypes, AllTypesTableName)); } catch (AlreadyExistsException) { } ======= //A 3 node cluster } protected override void TestFixtureSetUp() { base.TestFixtureSetUp(); Session.WaitForSchemaAgreement(Session.Execute(String.Format(TestUtils.CreateTableAllTypes, AllTypesTableName))); >>>>>>> //A 3 node cluster } protected override void TestFixtureSetUp() { base.TestFixtureSetUp(); Session.WaitForSchemaAgreement(Session.Execute(String.Format(TestUtils.CreateTableAllTypes, AllTypesTableName))); <<<<<<< var preparedStatement = _session.Prepare(insertQuery); CollectionAssert.AreEqual(new[] {0}, preparedStatement.RoutingIndexes); ======= var preparedStatement = Session.Prepare(insertQuery); >>>>>>> var preparedStatement = Session.Prepare(insertQuery); CollectionAssert.AreEqual(new[] {0}, preparedStatement.RoutingIndexes); <<<<<<< var preparedStatement = _session.Prepare(insertQuery); Assert.AreEqual(columns, String.Join(", ", preparedStatement.Metadata.Columns.Select(c => c.Name))); ======= var preparedStatement = Session.Prepare(insertQuery); >>>>>>> var preparedStatement = Session.Prepare(insertQuery); Assert.AreEqual(columns, String.Join(", ", preparedStatement.Metadata.Columns.Select(c => c.Name))); <<<<<<< var preparedStatement = _session.Prepare(insertQuery); CollectionAssert.AreEqual(new[] { 0 }, preparedStatement.RoutingIndexes); ======= var preparedStatement = Session.Prepare(insertQuery); >>>>>>> var preparedStatement = Session.Prepare(insertQuery); CollectionAssert.AreEqual(new[] { 0 }, preparedStatement.RoutingIndexes); <<<<<<< var preparedStatement = _session.Prepare("SELECT * FROM " + AllTypesTableName); //No parameters => no routing indexes Assert.Null(preparedStatement.RoutingIndexes); var rs = _session.Execute(preparedStatement.Bind()); ======= var preparedStatement = Session.Prepare("SELECT * FROM " + AllTypesTableName); var rs = Session.Execute(preparedStatement.Bind()); >>>>>>> var preparedStatement = Session.Prepare("SELECT * FROM " + AllTypesTableName); //No parameters => no routing indexes Assert.Null(preparedStatement.RoutingIndexes); <<<<<<< var insertStatement = _session.Prepare(String.Format("INSERT INTO {0} (id, text_sample) VALUES (?, ?)", AllTypesTableName)); _session.Execute(insertStatement.Bind(id, "sample text").SetTimestamp(timestamp)); var row = _session.Execute(new SimpleStatement(String.Format("SELECT id, text_sample, writetime(text_sample) FROM {0} WHERE id = ?", AllTypesTableName), id)).First(); ======= var insertStatement = Session.Prepare(String.Format("INSERT INTO {0} (id, text_sample) VALUES (?, ?)", AllTypesTableName)); Session.Execute(insertStatement.Bind(id, "sample text").SetTimestamp(timestamp)); var row = Session.Execute(new SimpleStatement(String.Format("SELECT id, text_sample, writetime(text_sample) FROM {0} WHERE id = ?", AllTypesTableName)).Bind(id)).First(); >>>>>>> var insertStatement = Session.Prepare(String.Format("INSERT INTO {0} (id, text_sample) VALUES (?, ?)", AllTypesTableName)); Session.Execute(insertStatement.Bind(id, "sample text").SetTimestamp(timestamp)); var row = Session.Execute(new SimpleStatement(String.Format("SELECT id, text_sample, writetime(text_sample) FROM {0} WHERE id = ?", AllTypesTableName), id)).First(); <<<<<<< var preparedStatement = _session.Prepare(query); Assert.Null(preparedStatement.RoutingIndexes); ======= var preparedStatement = Session.Prepare(query); >>>>>>> var preparedStatement = Session.Prepare(query); Assert.Null(preparedStatement.RoutingIndexes); <<<<<<< var insertQuery = String.Format("INSERT INTO {0} (text_sample, int_sample, bigint_sample, id) VALUES (:my_text, :my_int, :my_bigint, :id)", AllTypesTableName); var preparedStatement = _session.Prepare(insertQuery); CollectionAssert.AreEqual(new [] {3}, preparedStatement.RoutingIndexes); ======= var insertQuery = String.Format("INSERT INTO {0} (text_sample, int_sample, bigint_sample, id) VALUES (:my_text, :my_int, :my_bigint, :my_id)", AllTypesTableName); var preparedStatement = Session.Prepare(insertQuery); >>>>>>> var insertQuery = String.Format("INSERT INTO {0} (text_sample, int_sample, bigint_sample, id) VALUES (:my_text, :my_int, :my_bigint, :id)", AllTypesTableName); var preparedStatement = Session.Prepare(insertQuery); CollectionAssert.AreEqual(new [] {3}, preparedStatement.RoutingIndexes); <<<<<<< var insertQuery = String.Format("INSERT INTO {0} (text_sample, int_sample, bigint_sample, id) VALUES (:my_TeXt, :my_int, :my_bigint, :id)", AllTypesTableName); var preparedStatement = _session.Prepare(insertQuery); //The routing key is at position 3 CollectionAssert.AreEqual(new[] { 3 }, preparedStatement.RoutingIndexes); ======= var insertQuery = String.Format("INSERT INTO {0} (text_sample, int_sample, bigint_sample, id) VALUES (:my_TeXt, :my_int, :my_bigint, :my_id)", AllTypesTableName); var preparedStatement = Session.Prepare(insertQuery); >>>>>>> var insertQuery = String.Format("INSERT INTO {0} (text_sample, int_sample, bigint_sample, id) VALUES (:my_TeXt, :my_int, :my_bigint, :id)", AllTypesTableName); var preparedStatement = Session.Prepare(insertQuery); //The routing key is at position 3 CollectionAssert.AreEqual(new[] { 3 }, preparedStatement.RoutingIndexes); <<<<<<< _session.Execute(String.Format(TestUtils.CreateTableAllTypes, table)); ======= Session.WaitForSchemaAgreement(Session.Execute(String.Format(TestUtils.CreateTableAllTypes, table))); >>>>>>> Session.WaitForSchemaAgreement(Session.Execute(String.Format(TestUtils.CreateTableAllTypes, table))); <<<<<<< _session.Execute(String.Format(TestUtils.CreateTableAllTypes, table)); ======= Session.WaitForSchemaAgreement(Session.Execute(String.Format(TestUtils.CreateTableAllTypes, table))); >>>>>>> Session.Execute(String.Format(TestUtils.CreateTableAllTypes, table)); <<<<<<< _session.Execute(String.Format(TestUtils.CreateTableAllTypes, table)); ======= Session.WaitForSchemaAgreement(Session.Execute(String.Format(TestUtils.CreateTableAllTypes, table))); >>>>>>> Session.Execute(String.Format(TestUtils.CreateTableAllTypes, table));
<<<<<<< .UseDefaultHostingConfiguration(args) ======= // We set the server by name before default args so that command line arguments can override it. // This is used to allow deployers to choose the server for testing. .UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseConfiguration(config) >>>>>>> .UseConfiguration(config)
<<<<<<< using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Cassandra.IntegrationTests.TestBase; using Cassandra.IntegrationTests.TestClusterManagement.Simulacron; using NUnit.Framework; namespace Cassandra.IntegrationTests.Core { [TestFixture, Category("short")] ======= using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Cassandra.IntegrationTests.SimulacronAPI; using Cassandra.IntegrationTests.SimulacronAPI.PrimeBuilder; using Cassandra.IntegrationTests.TestBase; using Cassandra.IntegrationTests.TestClusterManagement.Simulacron; using NUnit.Framework; namespace Cassandra.IntegrationTests.Core { [TestFixture, Category("short"), Category("schema_tests")] >>>>>>> using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Cassandra.IntegrationTests.SimulacronAPI; using Cassandra.IntegrationTests.SimulacronAPI.PrimeBuilder; using Cassandra.IntegrationTests.TestBase; using Cassandra.IntegrationTests.TestClusterManagement.Simulacron; using NUnit.Framework; namespace Cassandra.IntegrationTests.Core { [TestFixture, Category("short")]
<<<<<<< protected override void AbortCore(ConnectionAbortedException abortReason) ======= public override void Abort(ConnectionAbortedException abortReason) >>>>>>> public override void Abort(ConnectionAbortedException abortReason) <<<<<<< ======= var buffer = result.Buffer; >>>>>>>
<<<<<<< #line 56 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 56 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" "); #line 57 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 56 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" "); #line 57 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 58 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 60 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 58 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 60 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 61 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 63 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 63 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 63 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 64 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" data: content_,\r\n"); #line 66 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" } #line default #line hidden #line 67 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 64 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" data: content_,\r\n"); #line 66 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" } #line default #line hidden #line 67 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 66 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 70 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 70 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 68 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 72 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 70 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 74 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 74 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 71 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 75 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 75 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 71 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 75 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 75 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 76 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 76 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 73 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 77 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 77 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 74 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 78 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 78 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 75 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 79 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 79 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 76 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 80 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 80 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 78 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 82 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 82 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 78 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 82 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 82 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 79 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 83 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 83 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 81 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 85 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 85 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 85 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 89 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 89 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 87 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 91 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 91 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 88 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 92 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 92 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 89 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 93 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 93 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 90 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 94 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 94 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 91 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 95 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 95 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 100 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 104 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 104 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 100 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 104 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 104 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 100 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 104 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 104 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 100 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 104 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 104 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" <<<<<<< #line 103 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" ======= #line 107 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt" >>>>>>> #line 107 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryPromisesClientTemplate.tt"
<<<<<<< #line 53 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 53 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" "); #line 54 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 53 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" "); #line 54 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 57 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 59 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 59 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 58 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 60 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 65 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 69 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 69 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 65 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 69 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 69 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 68 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 72 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 71 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 75 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 75 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 76 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 76 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 76 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 80 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 80 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 80 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 84 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 84 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 90 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 94 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 94 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 99 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 103 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 103 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 99 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 103 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 103 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" <<<<<<< #line 102 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" ======= #line 106 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt" >>>>>>> #line 106 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\AngularJSClientTemplate.tt"
<<<<<<< public async Task ClientStreaming_ResponseCompletesWithPendingRead_ThrowError() { // Arrange var requestStreamTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously); RequestDelegate appDelegate = async ctx => { var pendingReadTask = ctx.Request.Body.ReadAsync(new byte[1024], 0, 1024); ctx.Response.Headers["test-header"] = "true"; await ctx.Response.Body.FlushAsync(); }; Stream requestStream = null; var builder = new WebHostBuilder().Configure(app => app.Run(appDelegate)); var server = new TestServer(builder); var client = server.CreateClient(); var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); httpRequest.Version = new Version(2, 0); httpRequest.Content = new PushContent(async stream => { requestStream = stream; await requestStreamTcs.Task; }); // Act var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).WithTimeout(); var responseContent = await response.Content.ReadAsStreamAsync().WithTimeout(); // Assert response.EnsureSuccessStatusCode(); Assert.Equal("true", response.Headers.GetValues("test-header").Single()); // Read response var ex = await Assert.ThrowsAsync<IOException>(async () => { byte[] buffer = new byte[1024]; var length = await responseContent.ReadAsync(buffer).AsTask().WithTimeout(); }); Assert.Equal("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex.InnerException.Message); // Unblock request requestStreamTcs.TrySetResult(null); } [Fact] ======= public async Task ClientStreaming_ResponseCompletesWithoutResponseBodyWrite() { // Arrange var requestStreamTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously); RequestDelegate appDelegate = ctx => { ctx.Response.Headers["test-header"] = "true"; return Task.CompletedTask; }; Stream requestStream = null; var builder = new WebHostBuilder().Configure(app => app.Run(appDelegate)); var server = new TestServer(builder); var client = server.CreateClient(); var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); httpRequest.Version = new Version(2, 0); httpRequest.Content = new PushContent(async stream => { requestStream = stream; await requestStreamTcs.Task; }); // Act var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).WithTimeout(); var responseContent = await response.Content.ReadAsStreamAsync().WithTimeout(); // Assert response.EnsureSuccessStatusCode(); Assert.Equal("true", response.Headers.GetValues("test-header").Single()); // Read response byte[] buffer = new byte[1024]; var length = await responseContent.ReadAsync(buffer).AsTask().WithTimeout(); Assert.Equal(0, length); // Writing to request stream will fail because server is complete await Assert.ThrowsAnyAsync<Exception>(() => requestStream.WriteAsync(buffer).AsTask()); // Unblock request requestStreamTcs.TrySetResult(null); } [Fact] >>>>>>> public async Task ClientStreaming_ResponseCompletesWithPendingRead_ThrowError() { // Arrange var requestStreamTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously); RequestDelegate appDelegate = async ctx => { var pendingReadTask = ctx.Request.Body.ReadAsync(new byte[1024], 0, 1024); ctx.Response.Headers["test-header"] = "true"; await ctx.Response.Body.FlushAsync(); }; Stream requestStream = null; var builder = new WebHostBuilder().Configure(app => app.Run(appDelegate)); var server = new TestServer(builder); var client = server.CreateClient(); var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); httpRequest.Version = new Version(2, 0); httpRequest.Content = new PushContent(async stream => { requestStream = stream; await requestStreamTcs.Task; }); // Act var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).WithTimeout(); var responseContent = await response.Content.ReadAsStreamAsync().WithTimeout(); // Assert response.EnsureSuccessStatusCode(); Assert.Equal("true", response.Headers.GetValues("test-header").Single()); // Read response var ex = await Assert.ThrowsAsync<IOException>(async () => { byte[] buffer = new byte[1024]; var length = await responseContent.ReadAsync(buffer).AsTask().WithTimeout(); }); Assert.Equal("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex.InnerException.Message); // Unblock request requestStreamTcs.TrySetResult(null); } [Fact] public async Task ClientStreaming_ResponseCompletesWithoutResponseBodyWrite() { // Arrange var requestStreamTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously); RequestDelegate appDelegate = ctx => { ctx.Response.Headers["test-header"] = "true"; return Task.CompletedTask; }; Stream requestStream = null; var builder = new WebHostBuilder().Configure(app => app.Run(appDelegate)); var server = new TestServer(builder); var client = server.CreateClient(); var httpRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:12345"); httpRequest.Version = new Version(2, 0); httpRequest.Content = new PushContent(async stream => { requestStream = stream; await requestStreamTcs.Task; }); // Act var response = await client.SendAsync(httpRequest, HttpCompletionOption.ResponseHeadersRead).WithTimeout(); var responseContent = await response.Content.ReadAsStreamAsync().WithTimeout(); // Assert response.EnsureSuccessStatusCode(); Assert.Equal("true", response.Headers.GetValues("test-header").Single()); // Read response byte[] buffer = new byte[1024]; var length = await responseContent.ReadAsync(buffer).AsTask().WithTimeout(); Assert.Equal(0, length); // Writing to request stream will fail because server is complete await Assert.ThrowsAnyAsync<Exception>(() => requestStream.WriteAsync(buffer).AsTask()); // Unblock request requestStreamTcs.TrySetResult(null); } [Fact]
<<<<<<< [Description("Specifies whether to call CreateHttpClientAsync on the base class to create a new HttpClient.")] [Argument(Name = "GenerateClientInterfaces", DefaultValue = false)] public bool GenerateClientInterfaces { get; set; } [Description("Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required).")] [Argument(Name = "RequiredPropertiesMustBeDefined", DefaultValue = true)] public bool RequiredPropertiesMustBeDefined { get; set; } ======= >>>>>>> [Description("Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required).")] [Argument(Name = "RequiredPropertiesMustBeDefined", DefaultValue = true)] public bool RequiredPropertiesMustBeDefined { get; set; } <<<<<<< GenerateClientInterfaces = GenerateClientInterfaces, UseHttpClientCreationMethod = UseHttpClientCreationMethod, ClientBaseClass = ClientBaseClass, ======= UseHttpClientCreationMethod = UseHttpClientCreationMethod, GenerateClientClasses = GenerateClientClasses, GenerateClientInterfaces = GenerateClientInterfaces, ClientBaseClass = ClientBaseClass, >>>>>>> UseHttpClientCreationMethod = UseHttpClientCreationMethod, GenerateClientClasses = GenerateClientClasses, GenerateClientInterfaces = GenerateClientInterfaces, ClientBaseClass = ClientBaseClass,
<<<<<<< #line 50 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 50 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" "); #line 51 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 50 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" if(operation.HasContent){ #line default #line hidden this.Write(" "); #line 51 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 52 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 54 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 54 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 55 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 57 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 57 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 57 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 60 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" } #line default #line hidden #line 61 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 60 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" } #line default #line hidden #line 61 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 60 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 64 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 64 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 62 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 66 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 66 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 64 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 68 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 68 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 65 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 69 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 69 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 65 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 69 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 69 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 66 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 70 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 70 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 67 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 71 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 71 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 68 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 72 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 69 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 73 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 73 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 70 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 74 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 74 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 76 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 76 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 72 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 76 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 76 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 75 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 79 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 79 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 77 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 81 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 81 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 83 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 87 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 87 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 85 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 89 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 89 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 86 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 90 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 90 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 87 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 91 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 91 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 88 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 92 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 92 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 89 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 93 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 93 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 98 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 102 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 102 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 98 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 102 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 102 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" <<<<<<< #line 101 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" ======= #line 105 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt" >>>>>>> #line 105 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\JQueryCallbacksClientTemplate.tt"
<<<<<<< #line 54 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" if(!operation.IsGetOrHead){ ======= #line 54 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" if(operation.HasContent){ >>>>>>> #line 54 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" if(operation.HasContent){ <<<<<<< #line 56 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" ======= #line 57 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" >>>>>>> #line 57 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" <<<<<<< #line 59 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" if(!operation.IsGetOrHead){ ======= #line 59 "C:\Data\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" if(operation.HasContent){ >>>>>>> #line 59 "C:\Projects\NSwag\src\NSwag.CodeGeneration.TypeScript\Templates\FetchClientTemplate.tt" if(operation.HasContent){
<<<<<<< patternNode.NodeTableObjectName = nodeTable.TableObjectName; if (patternNode.NodeTableObjectName.SchemaIdentifier == null) patternNode.NodeTableObjectName.Identifiers.Insert(0, new Identifier {Value = "dbo"}); var nodeTypeTuple = WNamedTableReference.SchemaNameToTuple(patternNode.NodeTableObjectName); patternNode.IncludedNodeNames = _graphMetaData.NodeViewMapping.ContainsKey(nodeTypeTuple) ? _graphMetaData.NodeViewMapping[nodeTypeTuple] : null; ======= node.NodeTableObjectName = nodeTable.TableObjectName; if (node.NodeTableObjectName.SchemaIdentifier == null) node.NodeTableObjectName.Identifiers.Insert(0, new Identifier {Value = "dbo"}); var nodeTypeTuple = WNamedTableReference.SchemaNameToTuple(node.NodeTableObjectName); //node.IncludedNodeNames = _graphMetaData.NodeViewMapping.ContainsKey(nodeTypeTuple) // ? _graphMetaData.NodeViewMapping[nodeTypeTuple] // : null; >>>>>>> patternNode.NodeTableObjectName = nodeTable.TableObjectName; if (patternNode.NodeTableObjectName.SchemaIdentifier == null) patternNode.NodeTableObjectName.Identifiers.Insert(0, new Identifier {Value = "dbo"}); var nodeTypeTuple = WNamedTableReference.SchemaNameToTuple(patternNode.NodeTableObjectName); <<<<<<< SourceNode = patternNode, EdgeColumn = new WColumnReferenceExpression ======= edge = new MatchEdge >>>>>>> edge = new MatchEdge <<<<<<< } }, EdgeAlias = edgeAlias, BindNodeTableObjName = new WSchemaObjectName( new Identifier {Value = schema}, new Identifier {Value = bindTableName} ), IncludedEdgeNames = edgeInfo.IsEdgeView ? edgeInfo.EdgeColumns : null, MinLength = currentEdgeColumnRef.MinLength, MaxLength = currentEdgeColumnRef.MaxLength, AttributeValueDict = currentEdgeColumnRef.AttributeValueDict }; ======= }, EdgeAlias = edgeAlias, BindNodeTableObjName = new WSchemaObjectName( new Identifier {Value = schema}, new Identifier {Value = bindTableName} ), }; } else { edge = new MatchPath { SourceNode = node, EdgeColumn = new WColumnReferenceExpression { MultiPartIdentifier = new WMultiPartIdentifier { Identifiers = new List<Identifier> { edgeIdentifier } } }, EdgeAlias = edgeAlias, BindNodeTableObjName = new WSchemaObjectName( new Identifier {Value = schema}, new Identifier {Value = bindTableName} ), MinLength = currentEdge.MinLength, MaxLength = currentEdge.MaxLength, AttributeValueDict = currentEdge.AttributeValueDict }; } >>>>>>> }, EdgeAlias = edgeAlias, BindNodeTableObjName = new WSchemaObjectName( new Identifier {Value = schema}, new Identifier {Value = bindTableName} ), }; } else { edge = new MatchPath { SourceNode = patternNode, EdgeColumn = new WColumnReferenceExpression { MultiPartIdentifier = new WMultiPartIdentifier { Identifiers = new List<Identifier> { edgeIdentifier } } }, EdgeAlias = edgeAlias, BindNodeTableObjName = new WSchemaObjectName( new Identifier {Value = schema}, new Identifier {Value = bindTableName} ), MinLength = currentEdgeColumnRef.MinLength, MaxLength = currentEdgeColumnRef.MaxLength, AttributeValueDict = currentEdgeColumnRef.AttributeValueDict }; }
<<<<<<< using EventStore.ClientAPI; using EventStore.ClientAPI.SystemData; using Microsoft.Extensions.Diagnostics.HealthChecks; using System; using System.Threading; using System.Threading.Tasks; namespace HealthChecks.EventStore { public class EventStoreHealthCheck : IHealthCheck { const string CONNECTION_NAME = "AspNetCore HealthCheck Connection"; const int ELAPSED_DELAY_MILLISECONDS = 500; const int RECONNECTION_LIMIT = 1; private readonly string _eventStoreConnection; private readonly string _login; private readonly string _password; public EventStoreHealthCheck(string eventStoreConnection, string login, string password) { _eventStoreConnection = eventStoreConnection ?? throw new ArgumentNullException(nameof(eventStoreConnection)); _login = login; _password = password; } public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) { try { var eventStoreUri = new Uri(_eventStoreConnection); ConnectionSettings connectionSettings; if (string.IsNullOrEmpty(_login) || string.IsNullOrEmpty(_password)) { connectionSettings = ConnectionSettings.Create() .LimitReconnectionsTo(RECONNECTION_LIMIT) .SetReconnectionDelayTo(TimeSpan.FromMilliseconds(ELAPSED_DELAY_MILLISECONDS)) .Build(); } else { connectionSettings = ConnectionSettings.Create() .LimitReconnectionsTo(RECONNECTION_LIMIT) .SetReconnectionDelayTo(TimeSpan.FromMilliseconds(ELAPSED_DELAY_MILLISECONDS)) .SetDefaultUserCredentials(new UserCredentials(_login, _password)) .Build(); } using (var connection = EventStoreConnection.Create( connectionSettings, eventStoreUri, CONNECTION_NAME)) { var tcs = new TaskCompletionSource<HealthCheckResult>(); //connected connection.Connected += (s, e) => { tcs.TrySetResult(HealthCheckResult.Healthy()); }; //connection closed after configured amount of failed reconnections connection.Closed += (s, e) => { tcs.TrySetResult(new HealthCheckResult( status: context.Registration.FailureStatus, description: e.Reason)); }; //connection error connection.ErrorOccurred += (s, e) => { tcs.TrySetResult(new HealthCheckResult( status: context.Registration.FailureStatus, exception: e.Exception)); }; using (cancellationToken.Register(() => connection.Close())) { //completes after tcp connection init, but before successful connection and login await connection.ConnectAsync(); } cancellationToken.ThrowIfCancellationRequested(); using (cancellationToken.Register(() => tcs.TrySetCanceled())) { return await tcs.Task; } } } catch (Exception ex) { return new HealthCheckResult(context.Registration.FailureStatus, exception: ex); } } } ======= using EventStore.ClientAPI; using EventStore.ClientAPI.SystemData; using Microsoft.Extensions.Diagnostics.HealthChecks; using System; using System.Threading; using System.Threading.Tasks; namespace HealthChecks.EventStore { public class EventStoreHealthCheck : IHealthCheck { const string CONNECTION_NAME = "AspNetCore HealthCheck Connection"; const int ELAPSED_DELAY_MILLISECONDS = 500; const int RECONNECTION_LIMIT = 1; private readonly string _eventStoreConnection; private readonly string _login; private readonly string _password; public EventStoreHealthCheck(string eventStoreConnection, string login, string password) { _eventStoreConnection = eventStoreConnection ?? throw new ArgumentNullException(nameof(eventStoreConnection)); _login = login; _password = password; } public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) { try { var eventStoreUri = new Uri(_eventStoreConnection); ConnectionSettings connectionSettings; if (string.IsNullOrEmpty(_login) || string.IsNullOrEmpty(_password)) { connectionSettings = ConnectionSettings.Create() .LimitReconnectionsTo(RECONNECTION_LIMIT) .SetReconnectionDelayTo(TimeSpan.FromMilliseconds(ELAPSED_DELAY_MILLISECONDS)) .Build(); } else { connectionSettings = ConnectionSettings.Create() .LimitReconnectionsTo(RECONNECTION_LIMIT) .SetReconnectionDelayTo(TimeSpan.FromMilliseconds(ELAPSED_DELAY_MILLISECONDS)) .SetDefaultUserCredentials(new UserCredentials(_login, _password)) .Build(); } using (var connection = EventStoreConnection.Create( connectionSettings, eventStoreUri, CONNECTION_NAME)) { var tcs = new TaskCompletionSource<HealthCheckResult>(); //connected connection.Connected += (s, e) => { tcs.TrySetResult(HealthCheckResult.Healthy()); }; //connection closed after configured amount of failed reconnections connection.Closed += (s, e) => { tcs.TrySetResult(new HealthCheckResult( status: context.Registration.FailureStatus, description: e.Reason)); }; //connection error connection.ErrorOccurred += (s, e) => { tcs.TrySetResult(new HealthCheckResult( status: context.Registration.FailureStatus, exception: e.Exception)); }; using (cancellationToken.Register(() => connection.Close())) { //completes after tcp connection init, but before successful connection and login await connection.ConnectAsync(); } cancellationToken.ThrowIfCancellationRequested(); using (cancellationToken.Register(() => tcs.TrySetCanceled())) { return await tcs.Task; } } } catch (Exception ex) { return new HealthCheckResult(context.Registration.FailureStatus, exception: ex); } } } >>>>>>> using EventStore.ClientAPI; using EventStore.ClientAPI.SystemData; using Microsoft.Extensions.Diagnostics.HealthChecks; using System; using System.Threading; using System.Threading.Tasks; namespace HealthChecks.EventStore { public class EventStoreHealthCheck : IHealthCheck { const string CONNECTION_NAME = "AspNetCore HealthCheck Connection"; const int ELAPSED_DELAY_MILLISECONDS = 500; const int RECONNECTION_LIMIT = 1; private readonly string _eventStoreConnection; private readonly string _login; private readonly string _password; public EventStoreHealthCheck(string eventStoreConnection, string login, string password) { _eventStoreConnection = eventStoreConnection ?? throw new ArgumentNullException(nameof(eventStoreConnection)); _login = login; _password = password; } public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) { try { var eventStoreUri = new Uri(_eventStoreConnection); ConnectionSettings connectionSettings; if (string.IsNullOrEmpty(_login) || string.IsNullOrEmpty(_password)) { connectionSettings = ConnectionSettings.Create() .LimitReconnectionsTo(RECONNECTION_LIMIT) .SetReconnectionDelayTo(TimeSpan.FromMilliseconds(ELAPSED_DELAY_MILLISECONDS)) .Build(); } else { connectionSettings = ConnectionSettings.Create() .LimitReconnectionsTo(RECONNECTION_LIMIT) .SetReconnectionDelayTo(TimeSpan.FromMilliseconds(ELAPSED_DELAY_MILLISECONDS)) .SetDefaultUserCredentials(new UserCredentials(_login, _password)) .Build(); } using (var connection = EventStoreConnection.Create( connectionSettings, eventStoreUri, CONNECTION_NAME)) { var tcs = new TaskCompletionSource<HealthCheckResult>(); //connected connection.Connected += (s, e) => { tcs.TrySetResult(HealthCheckResult.Healthy()); }; //connection closed after configured amount of failed reconnections connection.Closed += (s, e) => { tcs.TrySetResult(new HealthCheckResult( status: context.Registration.FailureStatus, description: e.Reason)); }; //connection error connection.ErrorOccurred += (s, e) => { tcs.TrySetResult(new HealthCheckResult( status: context.Registration.FailureStatus, exception: e.Exception)); }; using (cancellationToken.Register(() => connection.Close())) { //completes after tcp connection init, but before successful connection and login await connection.ConnectAsync(); } cancellationToken.ThrowIfCancellationRequested(); using (cancellationToken.Register(() => tcs.TrySetCanceled())) { return await tcs.Task; } } } catch (Exception ex) { return new HealthCheckResult(context.Registration.FailureStatus, exception: ex); } } }
<<<<<<< public virtual Task SignOutAsync(AuthenticationProperties properties) { // Create a new ticket containing an empty identity and // the authentication properties extracted from the context. var ticket = new AuthenticationTicket( new ClaimsPrincipal(new ClaimsIdentity()), properties, Scheme.Name); return HandleSignOutAsync(ticket); } ======= protected override Task HandleSignOutAsync(SignOutContext context) => HandleSignOutAsync(new AuthenticationProperties(context.Properties)); >>>>>>> public virtual Task SignOutAsync(AuthenticationProperties properties) => HandleSignOutAsync(properties ?? new AuthenticationProperties()); <<<<<<< var notification = new ProcessSignoutResponseContext(Context, Scheme, Options, ticket, request, response); await Provider.ProcessSignoutResponse(notification); ======= var notification = new ProcessSignoutResponseContext(Context, Options, properties, request, response); await Options.Provider.ProcessSignoutResponse(notification); >>>>>>> var notification = new ProcessSignoutResponseContext(Context, Scheme, Options, properties, request, response); await Options.Provider.ProcessSignoutResponse(notification); <<<<<<< var notification = new ProcessChallengeResponseContext(Context, Scheme, Options, ticket, request, response); await Provider.ProcessChallengeResponse(notification); ======= var notification = new ProcessChallengeResponseContext(Context, Options, properties, request, response); await Options.Provider.ProcessChallengeResponse(notification); >>>>>>> var notification = new ProcessChallengeResponseContext(Context, Scheme, Options, properties, request, response); await Options.Provider.ProcessChallengeResponse(notification);
<<<<<<< ======= if (string.IsNullOrEmpty(ContentHeader)) HasHeader = false; LocationOfMyWindow = @params.WindowStartupLocation; >>>>>>>
<<<<<<< ======= if (string.IsNullOrEmpty(ContentHeader)) HasHeader = false; LocationOfMyWindow = @params.WindowStartupLocation; >>>>>>>
<<<<<<< public static void ChangeColorEffect(float[,] matrix) ======= public static float[,] Multiply(float[,] a, float[,] b) { if (a.GetLength(1) != b.GetLength(0)) { throw new Exception("a.GetLength(1) != b.GetLength(0)"); } float[,] c = new float[a.GetLength(0), b.GetLength(1)]; for (int i = 0; i < c.GetLength(0); i++) { for (int j = 0; j < c.GetLength(1); j++) { for (int k = 0; k < a.GetLength(1); k++) // k<b.GetLength(0) { c[i, j] = c[i, j] + a[i, k] * b[k, j]; } } } return c; } public static void ChangeColorEffect(IntPtr hwndMag, float[,] matrix) >>>>>>> public static float[,] Multiply(float[,] a, float[,] b) { if (a.GetLength(1) != b.GetLength(0)) { throw new Exception("a.GetLength(1) != b.GetLength(0)"); } float[,] c = new float[a.GetLength(0), b.GetLength(1)]; for (int i = 0; i < c.GetLength(0); i++) { for (int j = 0; j < c.GetLength(1); j++) { for (int k = 0; k < a.GetLength(1); k++) // k<b.GetLength(0) { c[i, j] = c[i, j] + a[i, k] * b[k, j]; } } } return c; } public static void ChangeColorEffect(float[,] matrix)
<<<<<<< using System.Runtime.CompilerServices; using System.Windows.Diagnostics; using System.Windows.Interop; ======= using System.Runtime.CompilerServices; >>>>>>> using System.Runtime.CompilerServices; <<<<<<< public enum NoiseType { Simplex, OpenSimplex2/*, OpenSimplex2S*/, Cellular, Perlin, ValueCubic, Value }; public enum FractalType { None, FBm, Billow, Ridged, DomainWarpProgressive, DomainWarpIndependent }; ======= private const short INLINE = 256; // MethodImplOptions.AggressiveInlining; private const short OPTIMISE = 512; // MethodImplOptions.AggressiveOptimization; public enum NoiseType { Value, ValueCubic, Perlin, Simplex, OpenSimplex2f, Cellular }; public enum FractalType { None, FBm, Ridged, PingPong, DomainWarpProgressive, DomainWarpIndependent }; >>>>>>> private const short INLINE = 256; // MethodImplOptions.AggressiveInlining; private const short OPTIMISE = 512; // MethodImplOptions.AggressiveOptimization; public enum NoiseType { Simplex, OpenSimplex2/*, OpenSimplex2S*/, Cellular, Perlin, ValueCubic, Value }; public enum FractalType { None, FBm, Ridged, PingPong, DomainWarpProgressive, DomainWarpIndependent }; <<<<<<< case FractalType.Billow: return GenFractalBillow(x, y); case FractalType.Ridged: ======= case FractalType.Ridged: >>>>>>> case FractalType.Ridged: <<<<<<< case FractalType.Billow: return GenFractalBillow(x, y, z); case FractalType.Ridged: ======= case FractalType.Ridged: >>>>>>> case FractalType.Ridged:
<<<<<<< using System.Collections.Generic; using StructureMap.Pipeline; ======= using StructureMap; using IContainer = Bifrost.Execution.IContainer; >>>>>>> using StructureMap.Pipeline; <<<<<<< /// <inheritdoc/> public BindingLifecycle DefaultLifecycle { get; set; } ILifecycle GetInstanceScopeFor(BindingLifecycle lifecycle) { switch (lifecycle) { case BindingLifecycle.Transient: return new TransientLifecycle(); case BindingLifecycle.Request: throw new NotImplementedException(); case BindingLifecycle.Singleton: return new SingletonLifecycle(); case BindingLifecycle.Thread: return new ThreadLocalStorageLifecycle(); } return new TransientLifecycle(); } ======= >>>>>>> ILifecycle GetInstanceScopeFor(BindingLifecycle lifecycle) { switch (lifecycle) { case BindingLifecycle.Transient: return new TransientLifecycle(); case BindingLifecycle.Request: throw new NotImplementedException(); case BindingLifecycle.Singleton: return new SingletonLifecycle(); case BindingLifecycle.Thread: return new ThreadLocalStorageLifecycle(); } return new TransientLifecycle(); }
<<<<<<< ======= using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; >>>>>>> using System.Collections.Generic; <<<<<<< public override int GetHashCode() => _descriptor?.GetHashCode() ?? 0; ======= [SuppressMessage("ReSharper", "NonReadonlyMemberInGetHashCode")] public override int GetHashCode() => Descriptor.GetHashCode(); >>>>>>> public override int GetHashCode() => Descriptor.GetHashCode();
<<<<<<< public event Action? Registered; public event Action<PeerId, PeerUpdateAction>? PeerUpdated; ======= public event Action Registered; public event Action<PeerId, PeerUpdateAction> PeerUpdated; public event Action<PeerId, IReadOnlyList<Subscription>> PeerSubscriptionsUpdated; >>>>>>> public event Action? Registered; public event Action<PeerId, PeerUpdateAction>? PeerUpdated; public event Action<PeerId, IReadOnlyList<Subscription>>? PeerSubscriptionsUpdated; <<<<<<< public PeerDescriptor? GetPeerDescriptor(PeerId peerId) ======= public void EnableSubscriptionsUpdatedFor(IEnumerable<Type> types) { // Not supported on peer directory server } public PeerDescriptor GetPeerDescriptor(PeerId peerId) >>>>>>> public void EnableSubscriptionsUpdatedFor(IEnumerable<Type> types) { // Not supported on peer directory server } public PeerDescriptor? GetPeerDescriptor(PeerId peerId)
<<<<<<< using Content.Shared.GameObjects.Components.Interactable; ======= using Content.Server.Utility; >>>>>>> using Content.Shared.GameObjects.Components.Interactable; using Content.Server.Utility;
<<<<<<< using Content.Server.Chemistry; ======= using System; using System.Collections.Generic; using System.ComponentModel.Design; using System.Linq; using Content.Server.Chemistry; using Content.Shared.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.Nutrition; >>>>>>> using Content.Server.Chemistry; using System; using System.Collections.Generic; using System.ComponentModel.Design; using System.Linq; using Content.Server.Chemistry; using Content.Shared.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.Nutrition; <<<<<<< using Content.Shared.Interfaces.Chemistry; ======= using Content.Shared.Utility; using Robust.Server.GameObjects; >>>>>>> using Content.Shared.Interfaces.Chemistry; using Content.Shared.Utility; using Robust.Server.GameObjects; <<<<<<< using System; using System.Collections.Generic; ======= using Robust.Shared.ViewVariables; >>>>>>> using System; using System.Collections.Generic; using Robust.Shared.ViewVariables; <<<<<<< ContainedSolution.AddReagent(reagentId, acceptedQuantity); if (!skipColor) { RecalculateColor(); } ======= _containedSolution.AddReagent(reagentId, acceptedQuantity); >>>>>>> ContainedSolution.AddReagent(reagentId, acceptedQuantity); if (!skipColor) { RecalculateColor(); } <<<<<<< ContainedSolution.AddSolution(solution); if (!skipColor) { RecalculateColor(); } ======= _containedSolution.AddSolution(solution); >>>>>>> ContainedSolution.AddSolution(solution); if (!skipColor) { RecalculateColor(); }
<<<<<<< bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out BuckleComponent buckle)) { return false; } return buckle.ToggleBuckle(eventArgs.User, Owner); } ======= public override ComponentState GetComponentState() { return new StrapComponentState(Position); } >>>>>>> public override ComponentState GetComponentState() { return new StrapComponentState(Position); } bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out BuckleComponent buckle)) { return false; } return buckle.ToggleBuckle(eventArgs.User, Owner); }
<<<<<<< FinishSuperconduction(BlocksAllAir ? _temperature : Air.Temperature); ======= FinishSuperconduction(BlocksAir ? Temperature : Air.Temperature); >>>>>>> FinishSuperconduction(BlocksAllAir ? Temperature : Air.Temperature);
<<<<<<< using Content.Shared.GameObjects.Components.Mobs; using Robust.Client.GameObjects; ======= using Content.Client.GameObjects.Components.Strap; using Content.Client.Interfaces.GameObjects.Components.Interaction; using Content.Shared.GameObjects.Components.Mobs; >>>>>>> using Content.Client.GameObjects.Components.Strap; using Content.Client.Interfaces.GameObjects.Components.Interaction; using Content.Shared.GameObjects.Components.Mobs; using Robust.Client.GameObjects;
<<<<<<< _documentStore.Conventions.DocumentKeyGenerator = (a,b,c) => string.Format("{0}/{1}", CollectionName, keyGenerator.NextFor<IEvent>()); _documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter()); ======= _documentStore.Conventions.DocumentKeyGenerator = o => string.Format("{0}/{1}", CollectionName, keyGenerator.NextFor<IEvent>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<long>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<int>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<string>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<Guid>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<short>()); >>>>>>> _documentStore.Conventions.DocumentKeyGenerator = (a,b,c) => string.Format("{0}/{1}", CollectionName, keyGenerator.NextFor<IEvent>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<long>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<int>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<string>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<Guid>()); //_documentStore.Conventions.IdentityTypeConvertors.Add(new ConceptTypeConverter<short>());
<<<<<<< ======= using System.Reflection; using System.Text.RegularExpressions; >>>>>>> using System.Reflection;
<<<<<<< TestName = result.Method.FullName, IsPrimary = isPrimary, ErrorMessage = result.ErrorMessage, StackTrace = result.StackTrace }; lineResults.Add(new KeyValuePair<int, LineResult>(stackItem.Line - 1, lineResult)); ======= var lineResult = new LineResult() { TestName = testName, IsPrimary = isPrimary, ErrorMessage = errorMessage, StackTrace = stackItems }; lineResults.Add(new KeyValuePair<int, LineResult>(stackItem.Line - 1, lineResult)); } isPrimary = false; >>>>>>> var lineResult = new LineResult() { TestName = result.Method.FullName, IsPrimary = isPrimary, ErrorMessage = result.ErrorMessage, StackTrace = result.StackTrace }; lineResults.Add(new KeyValuePair<int, LineResult>(stackItem.Line - 1, lineResult)); } isPrimary = false;
<<<<<<< using Controls; ======= using Elements2D; >>>>>>> using Controls; using Elements2D;
<<<<<<< using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; // 有关程序集的常规信息通过以下 // 特性集控制。更改这些特性值可修改 // 与程序集关联的信息。 [assembly: AssemblyTitle("Wox")] [assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Wox")] [assembly: AssemblyCopyright("The MIT License (MIT)")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // 将 ComVisible 设置为 false 使此程序集中的类型 // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, // 则将该类型上的 ComVisible 特性设置为 true。 [assembly: ComVisible(false)] //若要开始生成可本地化的应用程序,请在 //<PropertyGroup> 中的 .csproj 文件中 //设置 <UICulture>CultureYouAreCodingWith</UICulture>。例如,如果您在源文件中 //使用的是美国英语,请将 <UICulture> 设置为 en-US。然后取消 //对以下 NeutralResourceLanguage 特性的注释。更新 //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。 //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //主题特定资源词典所处位置 //(在页面或应用程序资源词典中 // 未找到某个资源的情况下使用) ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置 //(在页面、应用程序或任何主题特定资源词典中 // 未找到某个资源的情况下使用) )] // 程序集的版本信息由下面四个值组成: // // 主版本 // 次版本 // 生成号 // 修订号 // // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] ======= using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Wox")] [assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Wox")] [assembly: AssemblyCopyright("The MIT License (MIT)")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly )] [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyFileVersion("1.0.*")] >>>>>>> using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; [assembly: AssemblyTitle("Wox")] [assembly: AssemblyDescription("https://github.com/qianlifeng/Wox")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Wox")] [assembly: AssemblyCopyright("The MIT License (MIT)")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly )] [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyFileVersion("1.0.*")]
<<<<<<< ======= >>>>>>> <<<<<<< this.MainVM.ProgressBarVisibility = Visibility.Visible; ======= MainVM.IsProgressBarVisible = true; >>>>>>> MainVM.ProgressBarVisibility = Visibility.Visible; <<<<<<< this.MainVM.ProgressBarVisibility = Visibility.Collapsed; ======= MainVM.IsProgressBarVisible = false; >>>>>>> MainVM.ProgressBarVisibility = Visibility.Collapsed; <<<<<<< this.MainVM.ShowContextMenu(results, plugin.ID); ======= MainVM.ShowContextMenu(results, plugin.ID); >>>>>>> MainVM.ShowContextMenu(results, plugin.ID); <<<<<<< UserSettingStorage.Instance.WindowLeft = this.MainVM.Left; UserSettingStorage.Instance.WindowTop = this.MainVM.Top; this.MainVM.WindowVisibility = Visibility.Collapsed; ======= UserSettingStorage.Instance.WindowLeft = MainVM.Left; UserSettingStorage.Instance.WindowTop = MainVM.Top; MainVM.IsVisible = false; >>>>>>> UserSettingStorage.Instance.WindowLeft = MainVM.Left; UserSettingStorage.Instance.WindowTop = MainVM.Top; MainVM.WindowVisibility = Visibility.Collapsed; <<<<<<< this.MainVM.WindowVisibility = Visibility.Visible; this.MainVM.SelectAllText = true; ======= MainVM.IsVisible = true; MainVM.SelectAllText = true; >>>>>>> MainVM.WindowVisibility = Visibility.Visible; MainVM.SelectAllText = true;
<<<<<<< ======= using Wox.Core.UserSettings; using Wox.Helper; >>>>>>> using Wox.Helper; <<<<<<< if (IsContextMenuVisible) ======= if (ContextMenuVisibility.IsVisible()) >>>>>>> if (ContextMenuVisibility.IsVisible()) <<<<<<< if (IsContextMenuVisible) ======= if (ContextMenuVisibility.IsVisible()) >>>>>>> if (ContextMenuVisibility.IsVisible()) <<<<<<< if (IsContextMenuVisible) ======= if (ContextMenuVisibility.IsVisible()) >>>>>>> if (ContextMenuVisibility.IsVisible()) <<<<<<< if (IsContextMenuVisible) ======= if (ContextMenuVisibility.IsVisible()) >>>>>>> if (ContextMenuVisibility.IsVisible()) <<<<<<< if (!IsContextMenuVisible && Results.SelectedResult != null) ======= if (!ContextMenuVisibility.IsVisible() && null != Results.SelectedResult) >>>>>>> if (!ContextMenuVisibility.IsVisible() && null != Results.SelectedResult)
<<<<<<< using System.IO.Compression; using System.Globalization; using System.Linq; using System.Drawing; using Depressurizer.Lib; ======= using Depressurizer.Properties; >>>>>>> using Depressurizer.Lib; using Depressurizer.Properties;
<<<<<<< private static Regex regFlags = new Regex( "<div class=\\\"game_area_details_specs\\\">\\s*<div class=\\\"icon\\\"><a href=[^>]*><img[^>]*></a></div>\\s*<div class=\\\"name\\\"><a href=[^>]*>([^<]*)</a></div>", RegexOptions.IgnoreCase | RegexOptions.Compiled ); private static Regex regDevelopers = new Regex( "<b>Developer:</b>\\s*(<a[^>]*>([^<]+)</a>,?\\s*)+\\s*<br>", RegexOptions.IgnoreCase | RegexOptions.Compiled ); private static Regex regPublishers = new Regex( "<b>Publisher:</b>\\s*(<a[^>]*>([^<]+)</a>,?\\s*)+\\s*<br>", RegexOptions.IgnoreCase | RegexOptions.Compiled ); ======= //private static Regex regDLC = new Regex("<div class=\\\"name\\\"><a href=[^>]*>Downloadable Content</a></div>", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static Regex regFlags = new Regex( "<a href=\\\"http://store.steampowered.com/search/\\?category2=[0-9]+\\\" class=\\\"name\\\">([^<]*)</a>", RegexOptions.IgnoreCase | RegexOptions.Compiled ); private static Regex regDeveloper = new Regex("<b>Developer:</b>\\s*<a[^>]*>([^<]*)</a>", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static Regex regPublishers = new Regex("<b>Publisher:</b>\\s*(<a[^>]*>([^<]+)</a>,?\\s*)+\\s*<br>", RegexOptions.IgnoreCase | RegexOptions.Compiled); >>>>>>> //private static Regex regDLC = new Regex("<div class=\\\"name\\\"><a href=[^>]*>Downloadable Content</a></div>", RegexOptions.IgnoreCase | RegexOptions.Compiled); private static Regex regFlags = new Regex( "<a href=\\\"http://store.steampowered.com/search/\\?category2=[0-9]+\\\" class=\\\"name\\\">([^<]*)</a>", RegexOptions.IgnoreCase | RegexOptions.Compiled ); private static Regex regDevelopers = new Regex( "<b>Developer:</b>\\s*(<a[^>]*>([^<]+)</a>,?\\s*)+\\s*<br>", RegexOptions.IgnoreCase | RegexOptions.Compiled ); private static Regex regPublishers = new Regex( "<b>Publisher:</b>\\s*(<a[^>]*>([^<]+)</a>,?\\s*)+\\s*<br>", RegexOptions.IgnoreCase | RegexOptions.Compiled );
<<<<<<< Crx = 22, /// <summary>Truevision graphics.</summary> Tga = 23 ======= Crx = 22, /// <summary>Encapsulated PostScript</summary> Eps = 23 //("EPS", "Encapsulated PostScript", "application/postscript", "eps", "epsf", "epsi"), >>>>>>> Crx = 22, /// <summary>Encapsulated PostScript</summary> Eps = 23, //("EPS", "Encapsulated PostScript", "application/postscript", "eps", "epsf", "epsi"), /// <summary>Truevision graphics.</summary> Tga = 24 <<<<<<< "CRX", "TGA" ======= "CRX", "EPS" >>>>>>> "CRX", "EPS", "TGA" <<<<<<< "Canon Camera Raw", "Truevision Graphics" ======= "Canon Camera Raw", "Encapsulated PostScript" >>>>>>> "Canon Camera Raw", "Encapsulated PostScript", "Truevision Graphics" <<<<<<< null, "image/x-targa" ======= null, "application/postscript" >>>>>>> null, "application/postscript", "image/x-targa" <<<<<<< new[] { "cr3", "crm" }, new[] { "tga", "icb", "vda", "vst" } ======= new[] { "cr3", "crm" }, new[] { "eps", "epsf", "epsi" } >>>>>>> new[] { "cr3", "crm" }, new[] { "eps", "epsf", "epsi" }, new[] { "tga", "icb", "vda", "vst" }
<<<<<<< ======= using System.Collections.Specialized; using System.Diagnostics; >>>>>>> using System.Diagnostics; <<<<<<< static ISerialize defaultSerializer = WrappersHelper.Instance.GetSerializer<ProtobufSerializer>(); static ICompress defaultCompressor = WrappersHelper.Instance.GetCompressor<SevenZipLZMACompressor.LZMACompressor>(); ======= static ISerialize defaultSerializer = ProtobufSerializer.Instance; #if !iOS static ICompress defaultCompressor = SevenZipLZMACompressor.LZMACompressor.Instance; #else static ICompress defaultCompressor = NullCompressor.Instance; #endif >>>>>>> static ISerialize defaultSerializer = WrappersHelper.Instance.GetSerializer<ProtobufSerializer>(); static ICompress defaultCompressor = WrappersHelper.Instance.GetCompressor<SevenZipLZMACompressor.LZMACompressor>(); /// <summary> /// Get or set the default serializer for sending and receiving objects /// </summary>
<<<<<<< public const string NetCoreApp50 = "netcoreapp5.0"; ======= public const string NetCoreApp31 = "netcoreapp3.1"; >>>>>>> public const string NetCoreApp31 = "netcoreapp3.1"; public const string NetCoreApp50 = "netcoreapp5.0";
<<<<<<< // Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; using SharpGen.Config; using SharpGen.CppModel; namespace SharpGen.Model { /// <summary> /// A structElement that maps to a native struct /// </summary> [XmlType("struct")] public class CsStruct : CsTypeBase { public CsStruct() : this(null) { } public CsStruct(CppStruct cppStruct) { IsIn = true; IsOut = false; CppElement = cppStruct; // Align was not overloaded by MappingRule tag, then we can take the default value if (cppStruct != null && Align == 0) Align = cppStruct.Align; } protected override void UpdateFromTag(MappingRule tag) { base.UpdateFromTag(tag); Align = tag.StructPack != null ? tag.StructPack.Value : Align; HasMarshalType = tag.StructHasNativeValueType != null ? tag.StructHasNativeValueType.Value : false; GenerateAsClass = tag.StructToClass != null ? tag.StructToClass.Value : false; HasCustomMarshal = tag.StructCustomMarshal != null ? tag.StructCustomMarshal.Value : false; IsStaticMarshal = tag.IsStaticMarshal != null ? tag.IsStaticMarshal.Value : false; HasCustomNew = tag.StructCustomNew != null ? tag.StructCustomNew.Value : false; IsOut = tag.StructForceMarshalToToBeGenerated != null ? tag.StructForceMarshalToToBeGenerated.Value : false; // Force a marshalling if a struct need to be treated as a class) if (GenerateAsClass) HasMarshalType = true; } public IEnumerable<CsField> Fields { get { return Items.OfType<CsField>(); } } /// <summary> /// True if this structure is using an explicit layout else it's a sequential structure /// </summary> public bool ExplicitLayout { get; set; } /// <summary> /// True if this struct needs an internal marshal type /// </summary> public bool HasMarshalType { get; set; } public bool HasCustomMarshal { get; set; } public bool IsStaticMarshal { get; set; } public bool GenerateAsClass { get; set; } public bool HasCustomNew { get; set; } public string GetConstructor() { return string.Format(HasCustomNew ? "{0}.__NewNative()" : "new {0}.__Native()", QualifiedName); } public string StructTypeName { get { return GenerateAsClass ? "class" : "struct"; } } public bool IsIn { get; set; } public bool IsOut { get; set; } /// <summary> /// List of declared inner structs /// </summary> public IEnumerable<CsStruct> InnerStructs { get { return Items.OfType<CsStruct>(); } } } ======= // Copyright (c) 2010-2013 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; using SharpGen.Config; using SharpGen.CppModel; namespace SharpGen.Model { /// <summary> /// A structElement that maps to a native struct /// </summary> [XmlType("struct")] public class CsStruct : CsTypeBase { public CsStruct() : this(null) { } public CsStruct(CppStruct cppStruct) { IsIn = true; IsOut = false; CppElement = cppStruct; // Align was not overloaded by MappingRule tag, then we can take the default value if (cppStruct != null && Align == 0) Align = cppStruct.Align; } protected override void UpdateFromTag(MappingRule tag) { base.UpdateFromTag(tag); Align = tag.StructPack != null ? tag.StructPack.Value : Align; HasMarshalType = tag.StructHasNativeValueType != null ? tag.StructHasNativeValueType.Value : false; GenerateAsClass = tag.StructToClass != null ? tag.StructToClass.Value : false; HasCustomMarshal = tag.StructCustomMarshal != null ? tag.StructCustomMarshal.Value : false; IsStaticMarshal = tag.IsStaticMarshal != null ? tag.IsStaticMarshal.Value : false; HasCustomNew = tag.StructCustomNew != null ? tag.StructCustomNew.Value : false; IsOut = tag.StructForceMarshalToToBeGenerated != null ? tag.StructForceMarshalToToBeGenerated.Value : false; // Force a marshalling if a struct need to be treated as a class) if (GenerateAsClass) HasMarshalType = true; } public IEnumerable<CsField> Fields { get { return Items.OfType<CsField>(); } } /// <summary> /// True if this structure is using an explicit layout else it's a sequential structure /// </summary> public bool ExplicitLayout { get; set; } /// <summary> /// True if this struct needs an internal marshal type /// </summary> public bool HasMarshalType { get; set; } public bool HasCustomMarshal { get; set; } public bool IsStaticMarshal { get; set; } public bool GenerateAsClass { get; set; } public bool HasCustomNew { get; set; } public string GetConstructor() { return string.Format(HasCustomNew ? "{0}.__NewNative()" : "new {0}.__Native()", QualifiedName); } public string StructTypeName { get { return GenerateAsClass ? "class" : "struct"; } } public bool IsIn { get; set; } public bool IsOut { get; set; } /// <summary> /// List of declared inner structs /// </summary> public IEnumerable<CsStruct> InnerStructs { get { return Items.OfType<CsStruct>(); } } public override int CalculateAlignment() { int structAlignment = 0; foreach(var field in Fields) { var fieldAlignment = (field.MarshalType ?? field.PublicType).CalculateAlignment(); if(fieldAlignment < 0) { structAlignment = fieldAlignment; break; } if(fieldAlignment > structAlignment) { structAlignment = fieldAlignment; } } return structAlignment; } } >>>>>>> // Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using System.Collections.Generic; using System.Linq; using System.Xml.Serialization; using SharpGen.Config; using SharpGen.CppModel; namespace SharpGen.Model { /// <summary> /// A structElement that maps to a native struct /// </summary> [XmlType("struct")] public class CsStruct : CsTypeBase { public CsStruct() : this(null) { } public CsStruct(CppStruct cppStruct) { IsIn = true; IsOut = false; CppElement = cppStruct; // Align was not overloaded by MappingRule tag, then we can take the default value if (cppStruct != null && Align == 0) Align = cppStruct.Align; } protected override void UpdateFromTag(MappingRule tag) { base.UpdateFromTag(tag); Align = tag.StructPack != null ? tag.StructPack.Value : Align; HasMarshalType = tag.StructHasNativeValueType != null ? tag.StructHasNativeValueType.Value : false; GenerateAsClass = tag.StructToClass != null ? tag.StructToClass.Value : false; HasCustomMarshal = tag.StructCustomMarshal != null ? tag.StructCustomMarshal.Value : false; IsStaticMarshal = tag.IsStaticMarshal != null ? tag.IsStaticMarshal.Value : false; HasCustomNew = tag.StructCustomNew != null ? tag.StructCustomNew.Value : false; IsOut = tag.StructForceMarshalToToBeGenerated != null ? tag.StructForceMarshalToToBeGenerated.Value : false; // Force a marshalling if a struct need to be treated as a class) if (GenerateAsClass) HasMarshalType = true; } public IEnumerable<CsField> Fields { get { return Items.OfType<CsField>(); } } /// <summary> /// True if this structure is using an explicit layout else it's a sequential structure /// </summary> public bool ExplicitLayout { get; set; } /// <summary> /// True if this struct needs an internal marshal type /// </summary> public bool HasMarshalType { get; set; } public bool HasCustomMarshal { get; set; } public bool IsStaticMarshal { get; set; } public bool GenerateAsClass { get; set; } public bool HasCustomNew { get; set; } public string GetConstructor() { return string.Format(HasCustomNew ? "{0}.__NewNative()" : "new {0}.__Native()", QualifiedName); } public string StructTypeName { get { return GenerateAsClass ? "class" : "struct"; } } public bool IsIn { get; set; } public bool IsOut { get; set; } /// <summary> /// List of declared inner structs /// </summary> public IEnumerable<CsStruct> InnerStructs { get { return Items.OfType<CsStruct>(); } } public override int CalculateAlignment() { int structAlignment = 0; foreach(var field in Fields) { var fieldAlignment = (field.MarshalType ?? field.PublicType).CalculateAlignment(); if(fieldAlignment < 0) { structAlignment = fieldAlignment; break; } if(fieldAlignment > structAlignment) { structAlignment = fieldAlignment; } } return structAlignment; } }
<<<<<<< // Copyright (c) 2010-2013 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using SharpDX.Mathematics.Interop; namespace SharpDX.Direct3D10 { public partial class RasterizerStage { /// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="RawViewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public RawViewport[] GetViewports() { int numViewports = 0; GetViewports(ref numViewports, null); RawViewport[] viewports = new RawViewport[numViewports]; GetViewports(ref numViewports, viewports); return viewports; } /// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="RawViewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public void GetViewports(RawViewport[] viewports) { int numViewports = viewports.Length; GetViewports(ref numViewports, viewports); } /// <summary> /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. /// </summary> /// <returns>An array of scissor rectangles (see <see cref="RawRectangle"/>).</returns> /// <unmanaged>void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects)</unmanaged> public RawRectangle[] GetScissorRectangles() { int numRects = 0; GetScissorRects(ref numRects, null); RawRectangle[] scissorRectangles = new RawRectangle[numRects]; GetScissorRects(ref numRects, scissorRectangles); return scissorRectangles; } /// <summary> /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. /// </summary> /// <returns>An array of scissor rectangles (see <see cref="RawRectangle"/>).</returns> /// <unmanaged>void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects)</unmanaged> public void GetScissorRectangles(RawRectangle[] scissorRectangles) { int numRects = scissorRectangles.Length; GetScissorRects(ref numRects, scissorRectangles); } /// <summary> /// Binds a single scissor rectangle to the rasterizer stage. /// </summary> /// <param name = "scissorRectangle">The scissor rectangle to bind.</param> public void SetScissorRectangles(RawRectangle scissorRectangle) { SetScissorRectangles(new RawRectangle[] { scissorRectangle }); } /// <summary> /// Binds a set of scissor rectangles to the rasterizer stage. /// </summary> /// <param name = "scissorRectangles">The set of scissor rectangles to bind.</param> public void SetScissorRectangles(params RawRectangle[] scissorRectangles) { SetScissorRects(scissorRectangles.Length, scissorRectangles); } /// <summary> /// Binds a set of viewports to the rasterizer stage. /// </summary> /// <param name = "viewports">The set of viewports to bind.</param> public void SetViewports(params RawViewport[] viewports) { SetViewports(viewports.Length, viewports); } /// <summary> /// Binds a single viewport to the rasterizer stage. /// </summary> /// <param name = "viewport">The viewport to bind.</param> public void SetViewports(RawViewport viewport) { SetViewports(new RawViewport[] { viewport }); } } ======= // Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; namespace SharpDX.Direct3D10 { public partial class RasterizerStage { /// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="SharpDX.Viewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public SharpDX.Viewport[] GetViewports() { int numViewports = 0; GetViewports(ref numViewports, null); SharpDX.Viewport[] viewports = new SharpDX.Viewport[numViewports]; GetViewports(ref numViewports, viewports); return viewports; } /// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="SharpDX.Viewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public void GetViewports(SharpDX.Viewport[] viewports) { int numViewports = viewports.Length; GetViewports(ref numViewports, viewports); } /// <summary> /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. /// </summary> /// <returns>An array of scissor rectangles (see <see cref="SharpDX.Rectangle"/>).</returns> /// <unmanaged>void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects)</unmanaged> public SharpDX.Rectangle[] GetScissorRectangles() { int numRects = 0; GetScissorRects(ref numRects, null); SharpDX.Rectangle[] scissorRectangles = new Rectangle[numRects]; GetScissorRects(ref numRects, scissorRectangles); return scissorRectangles; } /// <summary> /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. /// </summary> /// <returns>An array of scissor rectangles (see <see cref="SharpDX.Rectangle"/>).</returns> /// <unmanaged>void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects)</unmanaged> public void GetScissorRectangles(SharpDX.Rectangle[] scissorRectangles) { int numRects = scissorRectangles.Length; GetScissorRects(ref numRects, scissorRectangles); } /// <summary> /// Binds a single scissor rectangle to the rasterizer stage. /// </summary> /// <param name = "scissorRectangle">The scissor rectangle to bind.</param> public void SetScissorRectangles(Rectangle scissorRectangle) { SetScissorRectangles(new Rectangle[] { scissorRectangle }); } /// <summary> /// Binds a set of scissor rectangles to the rasterizer stage. /// </summary> /// <param name = "scissorRectangles">The set of scissor rectangles to bind.</param> public void SetScissorRectangles(params Rectangle[] scissorRectangles) { SetScissorRects(scissorRectangles.Length, scissorRectangles); } /// <summary> /// Binds a set of viewports to the rasterizer stage. /// </summary> /// <param name = "viewports">The set of viewports to bind.</param> public void SetViewports(params Viewport[] viewports) { SetViewports(viewports.Length, viewports); } /// <summary> /// Binds a single viewport to the rasterizer stage. /// </summary> /// <param name = "viewport">The viewport to bind.</param> public void SetViewports(Viewport viewport) { SetViewports(new Viewport[] { viewport }); } } >>>>>>> // Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using SharpDX.Mathematics.Interop; namespace SharpDX.Direct3D10 { public partial class RasterizerStage { /// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="RawViewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public RawViewport[] GetViewports() { int numViewports = 0; GetViewports(ref numViewports, null); RawViewport[] viewports = new RawViewport[numViewports]; GetViewports(ref numViewports, viewports); return viewports; } /// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="RawViewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public void GetViewports(RawViewport[] viewports) { int numViewports = viewports.Length; GetViewports(ref numViewports, viewports); } /// <summary> /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. /// </summary> /// <returns>An array of scissor rectangles (see <see cref="RawRectangle"/>).</returns> /// <unmanaged>void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects)</unmanaged> public RawRectangle[] GetScissorRectangles() { int numRects = 0; GetScissorRects(ref numRects, null); RawRectangle[] scissorRectangles = new RawRectangle[numRects]; GetScissorRects(ref numRects, scissorRectangles); return scissorRectangles; } /// <summary> /// Get the array of {{scissor rectangles}} bound to the {{rasterizer stage}}. /// </summary> /// <returns>An array of scissor rectangles (see <see cref="RawRectangle"/>).</returns> /// <unmanaged>void RSGetScissorRects([InOut] int* NumRects,[Out, Buffer, Optional] D3D10_RECT* pRects)</unmanaged> public void GetScissorRectangles(RawRectangle[] scissorRectangles) { int numRects = scissorRectangles.Length; GetScissorRects(ref numRects, scissorRectangles); } /// <summary> /// Binds a single scissor rectangle to the rasterizer stage. /// </summary> /// <param name = "scissorRectangle">The scissor rectangle to bind.</param> public void SetScissorRectangles(RawRectangle scissorRectangle) { SetScissorRectangles(new RawRectangle[] { scissorRectangle }); } /// <summary> /// Binds a set of scissor rectangles to the rasterizer stage. /// </summary> /// <param name = "scissorRectangles">The set of scissor rectangles to bind.</param> public void SetScissorRectangles(params RawRectangle[] scissorRectangles) { SetScissorRects(scissorRectangles.Length, scissorRectangles); } /// <summary> /// Binds a set of viewports to the rasterizer stage. /// </summary> /// <param name = "viewports">The set of viewports to bind.</param> public void SetViewports(params RawViewport[] viewports) { SetViewports(viewports.Length, viewports); } /// <summary> /// Binds a single viewport to the rasterizer stage. /// </summary> /// <param name = "viewport">The viewport to bind.</param> public void SetViewports(RawViewport viewport) { SetViewports(new RawViewport[] { viewport }); } }
<<<<<<< // Copyright (c) 2010-2013 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using SharpDX; using SharpDX.Direct2D1; using SharpDX.Mathematics.Interop; namespace SharpDX.DirectWrite { public partial class BitmapRenderTarget { /// <summary> /// Draws a run of glyphs to a bitmap target at the specified position. /// </summary> /// <remarks> /// You can use the IDWriteBitmapRenderTarget::DrawGlyphRun to render to a bitmap from a custom text renderer that you implement. The custom text renderer should call this method from within the <see cref="M:SharpDX.DirectWrite.TextRenderer.DrawGlyphRun(System.IntPtr,System.Single,System.Single,SharpDX.DirectWrite.MeasuringMode,SharpDX.DirectWrite.GlyphRun,SharpDX.DirectWrite.GlyphRunDescription,SharpDX.ComObject)" /> callback method as shown in the following code. /// <code> STDMETHODIMP GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_MEASURING_MODE measuringMode, __in DWRITE_GLYPH_RUN const* glyphRun, __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, IUnknown* clientDrawingEffect ) /// { HRESULT hr = S_OK; // Pass on the drawing call to the render target to do the real work. RECT dirtyRect = {0}; hr = pRenderTarget_-&gt;DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, RGB(0,200,255), &amp;dirtyRect ); return hr; /// } </code> /// /// The baselineOriginX, baslineOriginY, measuringMethod, and glyphRun parameters are provided (as arguments) when the callback method is invoked. The renderingParams, textColor and blackBoxRect are not. Default rendering params can be retrieved by using the <see cref="M:SharpDX.DirectWrite.Factory.CreateMonitorRenderingParams(System.IntPtr,SharpDX.DirectWrite.RenderingParams@)" /> method. /// </remarks> /// <param name="baselineOriginX">The horizontal position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. </param> /// <param name="baselineOriginY">The vertical position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. </param> /// <param name="measuringMode">The measuring method for glyphs in the run, used with the other properties to determine the rendering mode. </param> /// <param name="glyphRun">The structure containing the properties of the glyph run. </param> /// <param name="renderingParams">The object that controls rendering behavior. </param> /// <param name="textColor">The foreground color of the text. </param> /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. </returns> /// <unmanaged>HRESULT IDWriteBitmapRenderTarget::DrawGlyphRun([None] float baselineOriginX,[None] float baselineOriginY,[None] DWRITE_MEASURING_MODE measuringMode,[In] const DWRITE_GLYPH_RUN* glyphRun,[None] IDWriteRenderingParams* renderingParams,[None] COLORREF textColor,[Out, Optional] RECT* blackBoxRect)</unmanaged> public void DrawGlyphRun(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun glyphRun, RenderingParams renderingParams, RawColor4 textColor) { RawRectangle temp; DrawGlyphRun(baselineOriginX, baselineOriginY, measuringMode, glyphRun, renderingParams, textColor, out temp); } } ======= // Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using SharpDX; using SharpDX.Direct2D1; namespace SharpDX.DirectWrite { public partial class BitmapRenderTarget { /// <summary> /// Draws a run of glyphs to a bitmap target at the specified position. /// </summary> /// <remarks> /// You can use the IDWriteBitmapRenderTarget::DrawGlyphRun to render to a bitmap from a custom text renderer that you implement. The custom text renderer should call this method from within the <see cref="M:SharpDX.DirectWrite.TextRenderer.DrawGlyphRun(System.IntPtr,System.Single,System.Single,SharpDX.DirectWrite.MeasuringMode,SharpDX.DirectWrite.GlyphRun,SharpDX.DirectWrite.GlyphRunDescription,SharpDX.ComObject)" /> callback method as shown in the following code. /// <code> STDMETHODIMP GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_MEASURING_MODE measuringMode, __in DWRITE_GLYPH_RUN const* glyphRun, __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, IUnknown* clientDrawingEffect ) /// { HRESULT hr = S_OK; // Pass on the drawing call to the render target to do the real work. RECT dirtyRect = {0}; hr = pRenderTarget_-&gt;DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, RGB(0,200,255), &amp;dirtyRect ); return hr; /// } </code> /// /// The baselineOriginX, baslineOriginY, measuringMethod, and glyphRun parameters are provided (as arguments) when the callback method is invoked. The renderingParams, textColor and blackBoxRect are not. Default rendering params can be retrieved by using the <see cref="M:SharpDX.DirectWrite.Factory.CreateMonitorRenderingParams(System.IntPtr,SharpDX.DirectWrite.RenderingParams@)" /> method. /// </remarks> /// <param name="baselineOriginX">The horizontal position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. </param> /// <param name="baselineOriginY">The vertical position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. </param> /// <param name="measuringMode">The measuring method for glyphs in the run, used with the other properties to determine the rendering mode. </param> /// <param name="glyphRun">The structure containing the properties of the glyph run. </param> /// <param name="renderingParams">The object that controls rendering behavior. </param> /// <param name="textColor">The foreground color of the text. </param> /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. </returns> /// <unmanaged>HRESULT IDWriteBitmapRenderTarget::DrawGlyphRun([None] float baselineOriginX,[None] float baselineOriginY,[None] DWRITE_MEASURING_MODE measuringMode,[In] const DWRITE_GLYPH_RUN* glyphRun,[None] IDWriteRenderingParams* renderingParams,[None] COLORREF textColor,[Out, Optional] RECT* blackBoxRect)</unmanaged> public void DrawGlyphRun(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun glyphRun, RenderingParams renderingParams, Color4 textColor) { Rectangle temp; DrawGlyphRun(baselineOriginX, baselineOriginY, measuringMode, glyphRun, renderingParams, textColor, out temp); } } >>>>>>> // Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using SharpDX; using SharpDX.Direct2D1; using SharpDX.Mathematics.Interop; namespace SharpDX.DirectWrite { public partial class BitmapRenderTarget { /// <summary> /// Draws a run of glyphs to a bitmap target at the specified position. /// </summary> /// <remarks> /// You can use the IDWriteBitmapRenderTarget::DrawGlyphRun to render to a bitmap from a custom text renderer that you implement. The custom text renderer should call this method from within the <see cref="M:SharpDX.DirectWrite.TextRenderer.DrawGlyphRun(System.IntPtr,System.Single,System.Single,SharpDX.DirectWrite.MeasuringMode,SharpDX.DirectWrite.GlyphRun,SharpDX.DirectWrite.GlyphRunDescription,SharpDX.ComObject)" /> callback method as shown in the following code. /// <code> STDMETHODIMP GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, DWRITE_MEASURING_MODE measuringMode, __in DWRITE_GLYPH_RUN const* glyphRun, __in DWRITE_GLYPH_RUN_DESCRIPTION const* glyphRunDescription, IUnknown* clientDrawingEffect ) /// { HRESULT hr = S_OK; // Pass on the drawing call to the render target to do the real work. RECT dirtyRect = {0}; hr = pRenderTarget_-&gt;DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, RGB(0,200,255), &amp;dirtyRect ); return hr; /// } </code> /// /// The baselineOriginX, baslineOriginY, measuringMethod, and glyphRun parameters are provided (as arguments) when the callback method is invoked. The renderingParams, textColor and blackBoxRect are not. Default rendering params can be retrieved by using the <see cref="M:SharpDX.DirectWrite.Factory.CreateMonitorRenderingParams(System.IntPtr,SharpDX.DirectWrite.RenderingParams@)" /> method. /// </remarks> /// <param name="baselineOriginX">The horizontal position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. </param> /// <param name="baselineOriginY">The vertical position of the baseline origin, in DIPs, relative to the upper-left corner of the DIB. </param> /// <param name="measuringMode">The measuring method for glyphs in the run, used with the other properties to determine the rendering mode. </param> /// <param name="glyphRun">The structure containing the properties of the glyph run. </param> /// <param name="renderingParams">The object that controls rendering behavior. </param> /// <param name="textColor">The foreground color of the text. </param> /// <returns>If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. </returns> /// <unmanaged>HRESULT IDWriteBitmapRenderTarget::DrawGlyphRun([None] float baselineOriginX,[None] float baselineOriginY,[None] DWRITE_MEASURING_MODE measuringMode,[In] const DWRITE_GLYPH_RUN* glyphRun,[None] IDWriteRenderingParams* renderingParams,[None] COLORREF textColor,[Out, Optional] RECT* blackBoxRect)</unmanaged> public void DrawGlyphRun(float baselineOriginX, float baselineOriginY, MeasuringMode measuringMode, GlyphRun glyphRun, RenderingParams renderingParams, RawColor4 textColor) { RawRectangle temp; DrawGlyphRun(baselineOriginX, baselineOriginY, measuringMode, glyphRun, renderingParams, textColor, out temp); } }
<<<<<<< private Task SendToAllConnections(string methodName, object[] args, Func<HubConnectionContext, object, bool> include, object state = null) ======= private Task SendToAllConnections(string methodName, object[] args, Func<HubConnectionContext, bool> include, CancellationToken cancellationToken) >>>>>>> private Task SendToAllConnections(string methodName, object[] args, Func<HubConnectionContext, object, bool> include, object state = null, CancellationToken cancellationToken) <<<<<<< private void SendToGroupConnections(string methodName, object[] args, ConcurrentDictionary<string, HubConnectionContext> connections, Func<HubConnectionContext, object, bool> include, object state, ref List<Task> tasks, ref SerializedHubMessage message) ======= private void SendToGroupConnections(string methodName, object[] args, ConcurrentDictionary<string, HubConnectionContext> connections, Func<HubConnectionContext, bool> include, ref List<Task> tasks, ref SerializedHubMessage message, CancellationToken cancellationToken) >>>>>>> private void SendToGroupConnections(string methodName, object[] args, ConcurrentDictionary<string, HubConnectionContext> connections, Func<HubConnectionContext, object, bool> include, object state, ref List<Task> tasks, ref SerializedHubMessage message, CancellationToken cancellationToken) <<<<<<< SendToGroupConnections(methodName, args, group, null, null, ref tasks, ref message); ======= SendToGroupConnections(methodName, args, group, null, ref tasks, ref message, cancellationToken); >>>>>>> SendToGroupConnections(methodName, args, group, null, null, ref tasks, ref message, cancellationToken); <<<<<<< SendToGroupConnections(methodName, args, group, null, null, ref tasks, ref message); ======= SendToGroupConnections(methodName, args, group, null, ref tasks, ref message, cancellationToken); >>>>>>> SendToGroupConnections(methodName, args, group, null, null, ref tasks, ref message, cancellationToken); <<<<<<< SendToGroupConnections(methodName, args, group, (connection, state) => !((IReadOnlyList<string>)state).Contains(connection.ConnectionId), excludedConnectionIds, ref tasks, ref message); ======= SendToGroupConnections(methodName, args, group, connection => !excludedConnectionIds.Contains(connection.ConnectionId), ref tasks, ref message, cancellationToken); >>>>>>> SendToGroupConnections(methodName, args, group, (connection, state) => !((IReadOnlyList<string>)state).Contains(connection.ConnectionId), excludedConnectionIds, ref tasks, ref message, cancellationToken); <<<<<<< return SendToAllConnections(methodName, args, (connection, state) => string.Equals(connection.UserIdentifier, (string)state, StringComparison.Ordinal), userId); ======= return SendToAllConnections(methodName, args, connection => string.Equals(connection.UserIdentifier, userId, StringComparison.Ordinal), cancellationToken); >>>>>>> return SendToAllConnections(methodName, args, (connection, state) => string.Equals(connection.UserIdentifier, (string)state, StringComparison.Ordinal), userId, cancellationToken); <<<<<<< return SendToAllConnections(methodName, args, (connection, state) => !((IReadOnlyList<string>)state).Contains(connection.ConnectionId), excludedConnectionIds); ======= return SendToAllConnections(methodName, args, connection => !excludedConnectionIds.Contains(connection.ConnectionId), cancellationToken); >>>>>>> return SendToAllConnections(methodName, args, (connection, state) => !((IReadOnlyList<string>)state).Contains(connection.ConnectionId), excludedConnectionIds, cancellationToken); <<<<<<< return SendToAllConnections(methodName, args, (connection, state) => ((IReadOnlyList<string>)state).Contains(connection.ConnectionId), connectionIds); ======= return SendToAllConnections(methodName, args, connection => connectionIds.Contains(connection.ConnectionId), cancellationToken); >>>>>>> return SendToAllConnections(methodName, args, (connection, state) => ((IReadOnlyList<string>)state).Contains(connection.ConnectionId), connectionIds, cancellationToken); <<<<<<< return SendToAllConnections(methodName, args, (connection, state) => ((IReadOnlyList<string>)state).Contains(connection.UserIdentifier), userIds); ======= return SendToAllConnections(methodName, args, connection => userIds.Contains(connection.UserIdentifier), cancellationToken); >>>>>>> return SendToAllConnections(methodName, args, (connection, state) => ((IReadOnlyList<string>)state).Contains(connection.UserIdentifier), userIds, cancellationToken);
<<<<<<< /// <summary> /// This class contains the required data for each connection to the server. /// </summary> public class Context : IDisposable { /// <summary> /// The exported version of this context. /// </summary> public readonly UserContext UserContext; /// <summary> /// The buffer used for accepting raw data from the socket. /// </summary> public byte[] Buffer; /// <summary> /// Whether or not the TCPClient is still connected. /// </summary> public bool Connected = true; /// <summary> /// The raw client connection. /// </summary> public TcpClient Connection; /// <summary> /// The current connection handler. /// </summary> public Handler Handler = Handler.Instance; /// <summary> /// The Header /// </summary> public Header Header; /// <summary> /// Whether or not this client has passed all the setup routines for the current handler(authentication, etc) /// </summary> public Boolean IsSetup; /// <summary> /// The max frame that we will accept from the client /// </summary> public UInt64 MaxFrameSize = 102400; //100kb /// <summary> /// Semaphores that limit sends and receives to 1 and a time. /// </summary> public SemaphoreSlim ReceiveReady = new SemaphoreSlim(1); /// <summary> /// How many bytes we received this tick. /// </summary> public int ReceivedByteCount; public SemaphoreSlim SendReady = new SemaphoreSlim(1); /// <summary> /// A link to the server listener instance this client is currently hosted on. /// </summary> public WebSocketServer Server; private int _bufferSize = 512; /// <summary> /// Initializes a new instance of the <see cref="Context"/> class. /// </summary> public Context(WebSocketServer server, TcpClient connection) { Server = server; Connection = connection; Buffer = new byte[_bufferSize]; UserContext = new UserContext(this) {ClientAddress = connection.Client.RemoteEndPoint}; } /// <summary> /// Gets or sets the size of the buffer. /// </summary> /// <value> /// The size of the buffer. /// </value> public int BufferSize { get { return _bufferSize; } set { _bufferSize = value; Buffer = new byte[_bufferSize]; } } #region IDisposable Members /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { Connected = false; UserContext.OnDisconnect(); // close client connection if (Connection != null) { try { Connection.Close(); } catch (Exception) { // skip } } } #endregion /// <summary> /// Disconnects the client /// </summary> public void Disconnect() { Connected = false; } /// <summary> /// Resets this instance. /// Clears the dataframe if necessary. Resets Received byte count. /// </summary> public void Reset() { if (UserContext.DataFrame != null) { if (UserContext.DataFrame.State == DataFrame.DataState.Complete) { UserContext.DataFrame.Reset(); } } ReceivedByteCount = 0; } ======= /// <summary> /// This class contains the required data for each connection to the server. /// </summary> public class Context : IDisposable { //private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// <summary> /// The exported version of this context. /// </summary> public readonly UserContext UserContext; /// <summary> /// The buffer used for accepting raw data from the socket. /// </summary> public byte[] Buffer; /// <summary> /// Whether or not the TCPClient is still connected. /// </summary> public bool Connected = true; /// <summary> /// The raw client connection. /// </summary> public TcpClient Connection; /// <summary> /// The current connection handler. /// </summary> public Handler Handler = Handler.Instance; /// <summary> /// The Header /// </summary> public Header Header; /// <summary> /// Whether or not this client has passed all the setup routines for the current handler(authentication, etc) /// </summary> public Boolean IsSetup; /// <summary> /// The max frame that we will accept from the client /// </summary> public UInt64 MaxFrameSize = 102400; //100kb /// <summary> /// Semaphores that limit sends and receives to 1 and a time. /// </summary> public SemaphoreSlim ReceiveReady = new SemaphoreSlim(1); /// <summary> /// How many bytes we received this tick. /// </summary> public int ReceivedByteCount; public SemaphoreSlim SendReady = new SemaphoreSlim(1); /// <summary> /// A link to the server listener instance this client is currently hosted on. /// </summary> public WebSocketServer Server; private int _bufferSize = 512; public SocketAsyncEventArgs ReceiveEventArgs { get; set; } public SocketAsyncEventArgs SendEventArgs { get; set; } /// <summary> /// Initializes a new instance of the <see cref="Context"/> class. /// </summary> public Context(WebSocketServer server, TcpClient connection) { Server = server; Connection = connection; Buffer = new byte[_bufferSize]; UserContext = new UserContext(this); ReceiveEventArgs = new SocketAsyncEventArgs(); SendEventArgs = new SocketAsyncEventArgs(); Handler.RegisterContext(this); if (connection != null) { UserContext.ClientAddress = connection.Client.RemoteEndPoint; } } /// <summary> /// Gets or sets the size of the buffer. /// </summary> /// <value> /// The size of the buffer. /// </value> public int BufferSize { get { return _bufferSize; } set { _bufferSize = value; Buffer = new byte[_bufferSize]; } } #region IDisposable Members /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { Connected = false; UserContext.OnDisconnect(); } #endregion /// <summary> /// Disconnects the client /// </summary> public void Disconnect() { //logger.Debug("Disconnected in " + Environment.StackTrace); Connected = false; } /// <summary> /// Resets this instance. /// Clears the dataframe if necessary. Resets Received byte count. /// </summary> public void Reset() { if (UserContext.DataFrame != null) { if (UserContext.DataFrame.State == DataFrame.DataState.Complete) { UserContext.DataFrame.Reset(); } } ReceivedByteCount = 0; } >>>>>>> /// <summary> /// This class contains the required data for each connection to the server. /// </summary> public class Context : IDisposable { //private static readonly ILog logger = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); /// <summary> /// The exported version of this context. /// </summary> public readonly UserContext UserContext; /// <summary> /// The buffer used for accepting raw data from the socket. /// </summary> public byte[] Buffer; /// <summary> /// Whether or not the TCPClient is still connected. /// </summary> public bool Connected = true; /// <summary> /// The raw client connection. /// </summary> public TcpClient Connection; /// <summary> /// The current connection handler. /// </summary> public Handler Handler = Handler.Instance; /// <summary> /// The Header /// </summary> public Header Header; /// <summary> /// Whether or not this client has passed all the setup routines for the current handler(authentication, etc) /// </summary> public Boolean IsSetup; /// <summary> /// The max frame that we will accept from the client /// </summary> public UInt64 MaxFrameSize = 102400; //100kb /// <summary> /// Semaphores that limit sends and receives to 1 and a time. /// </summary> public SemaphoreSlim ReceiveReady = new SemaphoreSlim(1); /// <summary> /// How many bytes we received this tick. /// </summary> public int ReceivedByteCount; public SemaphoreSlim SendReady = new SemaphoreSlim(1); /// <summary> /// A link to the server listener instance this client is currently hosted on. /// </summary> public WebSocketServer Server; private int _bufferSize = 512; public SocketAsyncEventArgs ReceiveEventArgs { get; set; } public SocketAsyncEventArgs SendEventArgs { get; set; } /// <summary> /// Initializes a new instance of the <see cref="Context"/> class. /// </summary> public Context(WebSocketServer server, TcpClient connection) { Server = server; Connection = connection; Buffer = new byte[_bufferSize]; UserContext = new UserContext(this); ReceiveEventArgs = new SocketAsyncEventArgs(); SendEventArgs = new SocketAsyncEventArgs(); Handler.RegisterContext(this); if (connection != null) { UserContext.ClientAddress = connection.Client.RemoteEndPoint; } } /// <summary> /// Gets or sets the size of the buffer. /// </summary> /// <value> /// The size of the buffer. /// </value> public int BufferSize { get { return _bufferSize; } set { _bufferSize = value; Buffer = new byte[_bufferSize]; } } #region IDisposable Members /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { Connected = false; UserContext.OnDisconnect(); // close client connection if (Connection != null) { try { Connection.Close(); } catch (Exception) { // skip } } } #endregion /// <summary> /// Disconnects the client /// </summary> public void Disconnect() { //logger.Debug("Disconnected in " + Environment.StackTrace); Connected = false; } /// <summary> /// Resets this instance. /// Clears the dataframe if necessary. Resets Received byte count. /// </summary> public void Reset() { if (UserContext.DataFrame != null) { if (UserContext.DataFrame.State == DataFrame.DataState.Complete) { UserContext.DataFrame.Reset(); } } ReceivedByteCount = 0; }
<<<<<<< #region Web JSObject Part public UInt16 Port { get; set; } public UInt16 UPnPPort { get; set; } public String Hostname { get; set; } ======= public ushort Port { get; set; } public ushort UPnPPort { get; set; } public string Hostname { get; set; } >>>>>>> #region Web JSObject Part public ushort Port { get; set; } public ushort UPnPPort { get; set; } public string Hostname { get; set; } <<<<<<< ======= public void buttonOn_Click() { StartServer(); } public void buttonOff_Click() { StopServer(); } public void consolelog(object s) { Console.WriteLine(s); } >>>>>>> public void consolelog(object s) { Console.WriteLine(s); }
<<<<<<< private static void Postfix(ref ItemDrop __instance) { if (!Configuration.Current.Items.IsEnabled) return; // if items config not enabled, continue with original method if (Configuration.Current.Items.droppedItemOnGroundDurationInSeconds.Equals(defaultSpawnTimeSeconds)) return; // if set to default, continue with original method if (!(bool)(UnityEngine.Object)__instance.m_nview || !__instance.m_nview.IsValid()) return; if (!__instance.m_nview.IsOwner()) return; // Get a DateTime value that is the current server time + item drop duration modifier DateTime serverTimeWithTimeChange = ZNet.instance.GetTime().AddSeconds(Configuration.Current.Items.droppedItemOnGroundDurationInSeconds - defaultSpawnTimeSeconds); // Re-set spawn time of item to the configured percentage of the original duration __instance.m_nview.GetZDO().Set("SpawnTime", serverTimeWithTimeChange.Ticks); } ======= >>>>>>> private static void Postfix(ref ItemDrop __instance) { if (!Configuration.Current.Items.IsEnabled) return; // if items config not enabled, continue with original method if (Configuration.Current.Items.droppedItemOnGroundDurationInSeconds.Equals(defaultSpawnTimeSeconds)) return; // if set to default, continue with original method if (!(bool)(UnityEngine.Object)__instance.m_nview || !__instance.m_nview.IsValid()) return; if (!__instance.m_nview.IsOwner()) return; // Get a DateTime value that is the current server time + item drop duration modifier DateTime serverTimeWithTimeChange = ZNet.instance.GetTime().AddSeconds(Configuration.Current.Items.droppedItemOnGroundDurationInSeconds - defaultSpawnTimeSeconds); // Re-set spawn time of item to the configured percentage of the original duration __instance.m_nview.GetZDO().Set("SpawnTime", serverTimeWithTimeChange.Ticks); }
<<<<<<< public VagonConfiguration Wagon { get; set; } public FreePlacementRotationConfiguration FreePlacementRotation { get; set; } ======= public WagonConfiguration Wagon { get; set; } public GatherConfiguration Gathering { get; set; } public DurabilityConfiguration Durability { get; set; } public ArmorConfiguration Armor { get; set; } >>>>>>> public WagonConfiguration Wagon { get; set; } public GatherConfiguration Gathering { get; set; } public DurabilityConfiguration Durability { get; set; } public ArmorConfiguration Armor { get; set; } public FreePlacementRotationConfiguration FreePlacementRotation { get; set; }
<<<<<<< /// <summary> /// Resize child EffectArea's collision that matches the specified type(s). /// </summary> ======= public static Texture2D LoadPng(Stream fileStream) { Texture2D texture = null; if (fileStream != null) { using (var memoryStream = new MemoryStream()) { fileStream.CopyTo(memoryStream); texture = new Texture2D(2, 2); texture.LoadImage(memoryStream.ToArray()); //This will auto-resize the texture dimensions. } } return texture; } public static string CreateMD5(string input) { // Use input string to calculate MD5 hash using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create()) { byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input); byte[] hashBytes = md5.ComputeHash(inputBytes); // Convert the byte array to hexadecimal string StringBuilder sb = new StringBuilder(); for (int i = 0; i < hashBytes.Length; i++) { sb.Append(hashBytes[i].ToString("X2")); } return sb.ToString(); } } // Resize child EffectArea's collision that matches the specified type(s). >>>>>>> public static Texture2D LoadPng(Stream fileStream) { Texture2D texture = null; if (fileStream != null) { using (var memoryStream = new MemoryStream()) { fileStream.CopyTo(memoryStream); texture = new Texture2D(2, 2); texture.LoadImage(memoryStream.ToArray()); //This will auto-resize the texture dimensions. } } return texture; } public static string CreateMD5(string input) { // Use input string to calculate MD5 hash using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create()) { byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input); byte[] hashBytes = md5.ComputeHash(inputBytes); // Convert the byte array to hexadecimal string StringBuilder sb = new StringBuilder(); for (int i = 0; i < hashBytes.Length; i++) { sb.Append(hashBytes[i].ToString("X2")); } return sb.ToString(); } } /// <summary> /// Resize child EffectArea's collision that matches the specified type(s). /// </summary>
<<<<<<< using System; using HarmonyLib; ======= using HarmonyLib; >>>>>>> using System; using HarmonyLib; <<<<<<< ======= using System; using ValheimPlus.Configurations; >>>>>>> using ValheimPlus.Configurations;
<<<<<<< ======= using AlphaTab.Rendering.Utils; using AlphaTab.Rendering.Glyphs; using AlphaTab.Util; >>>>>>> using AlphaTab.Rendering.Utils; using AlphaTab.Rendering.Glyphs; using AlphaTab.Util; <<<<<<< // finalize group (sizing etc). FitGroup(group); group.FinalizeGroup(); y += PaintGroup(group, y, canvas); ======= // finalize group (sizing etc). FitGroup(group); group.FinalizeGroup(this); Logger.Info(Name, "Rendering partial from bar " + group.FirstBarIndex + " to " + group.LastBarIndex); y += PaintGroup(group, y, canvas); } >>>>>>> // finalize group (sizing etc). FitGroup(group); group.FinalizeGroup(); Logger.Info(Name, "Rendering partial from bar " + group.FirstBarIndex + " to " + group.LastBarIndex); y += PaintGroup(group, y, canvas);
<<<<<<< private System.Windows.Forms.CheckBox checkBoxWaveformSnapToSceneChanges; private System.Windows.Forms.CheckBox checkBoxWaveformSingleClickSelect; ======= private System.Windows.Forms.Label labelSplitBehavior; private System.Windows.Forms.ComboBox comboBoxSplitBehavior; >>>>>>> private System.Windows.Forms.CheckBox checkBoxWaveformSnapToSceneChanges; private System.Windows.Forms.CheckBox checkBoxWaveformSingleClickSelect; private System.Windows.Forms.Label labelSplitBehavior; private System.Windows.Forms.ComboBox comboBoxSplitBehavior;
<<<<<<< private SocialNPC Marlon = null; private SocialNPC Morris = null; private bool firstTick = true; ======= private SocialNPC Marlon = null; private SocialNPC Morris = null; >>>>>>> private SocialNPC Marlon = null; private SocialNPC Morris = null; <<<<<<< helper.Events.GameLoop.ReturnedToTitle += this.Clean; helper.ConsoleCommands.Add("listnpcs", "Lists the NPCs currently in memory.\n\nUsage: listnpcs [name]\n - name : Optional value. The name of the npc.", this.ListNpcs); ======= helper.Events.GameLoop.DayEnding += this.OnDayEnding; >>>>>>> helper.Events.GameLoop.ReturnedToTitle += this.Clean; helper.ConsoleCommands.Add("listnpcs", "Lists the NPCs currently in memory.\n\nUsage: listnpcs [name]\n - name : Optional value. The name of the npc.", this.ListNpcs); <<<<<<< } else { Morris = new SocialNPC(Game1.getCharacterFromName("Morris", mustBeVillager: true), new Vector2(27, 27)); } ======= } else { Morris = new SocialNPC(Game1.getCharacterFromName("Morris", mustBeVillager: true), new Vector2(27, 27)); } >>>>>>> } else { Morris = new SocialNPC(Game1.getCharacterFromName("Morris", mustBeVillager: true), new Vector2(27, 27)); } <<<<<<< if (Marlon == null && Morris == null) return; var npcList = new List<SocialNPC>() { Marlon }; ======= var npcList = new List<SocialNPC>() { Marlon }; >>>>>>> if (Marlon == null && Morris == null) return; var npcList = new List<SocialNPC>() { Marlon }; <<<<<<< private List<NPC> FindNPC(string name) { List<NPC> found = new List<NPC>(); foreach (GameLocation loc in Game1.locations) { foreach (NPC npc in loc.characters) { if (npc.Name == name) { found.Add(npc); } } } return found; } private void RemoveDuplicates(string name) { List<NPC> list = FindNPC(name); foreach (NPC npc in list) { if (npc.GetType() != typeof(SocialNPC)) { Monitor.Log($"Removing duplicate of {npc.Name}. Type: {npc.GetType()}", LogLevel.Info); if (npc.currentLocation.characters.Remove(npc)) { Monitor.Log($"Success!", LogLevel.Info); } } } } private void PrintNPCs(string name) { List<NPC> list = this.FindNPC(name); this.Monitor.Log($"Found {list.Count} cases of {name}.", LogLevel.Info); foreach (NPC npc in list) { Type type = npc.GetType(); this.Monitor.Log($"{npc.Name} - {npc.currentLocation.Name} - {npc.Position} - {type.ToString()}"); } } ======= >>>>>>> private List<NPC> FindNPC(string name) { List<NPC> found = new List<NPC>(); foreach (GameLocation loc in Game1.locations) { foreach (NPC npc in loc.characters) { if (npc.Name == name) { found.Add(npc); } } } return found; } private void RemoveDuplicates(string name) { List<NPC> list = FindNPC(name); foreach (NPC npc in list) { if (npc.GetType() != typeof(SocialNPC)) { Monitor.Log($"Removing duplicate of {npc.Name}. Type: {npc.GetType()}", LogLevel.Info); if (npc.currentLocation.characters.Remove(npc)) { Monitor.Log($"Success!", LogLevel.Info); } } } } private void PrintNPCs(string name) { List<NPC> list = this.FindNPC(name); this.Monitor.Log($"Found {list.Count} cases of {name}.", LogLevel.Info); foreach (NPC npc in list) { Type type = npc.GetType(); this.Monitor.Log($"{npc.Name} - {npc.currentLocation.Name} - {npc.Position} - {type.ToString()}"); } }
<<<<<<< public abstract class VolumeStorage<T> : IDisposable where T : struct, IEquatable<T>, IFormattable ======= public abstract class VolumeStorage<T> where T : struct, IEquatable<T>, IFormattable >>>>>>> public abstract class VolumeStorage<T> where T : struct, IEquatable<T>, IFormattable <<<<<<< public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } ======= >>>>>>>
<<<<<<< public abstract void DoSubtractFrom(Volume<T> other, Volume<T> result); ======= >>>>>>> public abstract void DoSubtractFrom(Volume<T> other, Volume<T> result);
<<<<<<< this.upgraderConfig = new NuGetUpgrader.NuGetUpgraderConfig(this.tracer, null, NuGetFeedUrl, NuGetFeedName, NuGetFeedUrlForCredentials); ======= this.upgraderConfig = new NuGetUpgrader.NuGetUpgraderConfig(this.tracer, null, NuGetFeedUrl, NuGetFeedName); this.downloadFolder = "downloadFolderTestValue"; >>>>>>> this.upgraderConfig = new NuGetUpgrader.NuGetUpgraderConfig(this.tracer, null, NuGetFeedUrl, NuGetFeedName); <<<<<<< // Empty FeedUrlForCredentials nuGetUpgraderConfig = new NuGetUpgrader.NuGetUpgraderConfig(this.tracer, null, NuGetFeedUrl, NuGetFeedName, string.Empty); nuGetUpgrader = new NuGetUpgrader( CurrentVersion, this.tracer, false, false, this.mockFileSystem, nuGetUpgraderConfig, this.mockNuGetFeed.Object); nuGetUpgrader.UpgradeAllowed(out string _).ShouldBeFalse("Upgrade without FeedUrlForCredentials configured should not be allowed."); ======= >>>>>>>
<<<<<<< public abstract IEnumerable<EventListener> CreateTelemetryListeners(string providerName, string enlistmentId, string mountId); ======= public abstract bool TryVerifyAuthenticodeSignature(string path, out string subject, out string issuer, out string error); public abstract InProcEventListener CreateTelemetryListenerIfEnabled(string providerName, string enlistmentId, string mountId); >>>>>>> public abstract IEnumerable<EventListener> CreateTelemetryListeners(string providerName, string enlistmentId, string mountId); public abstract bool TryVerifyAuthenticodeSignature(string path, out string subject, out string issuer, out string error);
<<<<<<< "System.Diagnostics", ======= "System.ComponentModel", >>>>>>> "System.Diagnostics", "System.ComponentModel",
<<<<<<< } else if (attr is SealedAttribute || attr is EventArgsAttribute || attr is DelegateNameAttribute || attr is EventNameAttribute || attr is DefaultValueAttribute || attr is ObsoleteAttribute || attr is AlphaAttribute || attr is DefaultValueFromArgumentAttribute || attr is NewAttribute || attr is SinceAttribute || attr is PostGetAttribute || attr is NullAllowedAttribute || attr is CheckDisposedAttribute || attr is SnippetAttribute || attr is LionAttribute || attr is AppearanceAttribute || attr is ThreadSafeAttribute || attr is AutoreleaseAttribute || attr is EditorBrowsableAttribute) ======= } else if (attr is DefaultValueAttribute || attr is DefaultValueFromArgumentAttribute) { seenDefaultValue = true; continue; } else if (attr is NoDefaultValueAttribute) { seenNoDefaultValue = true; continue; } else if (attr is SealedAttribute || attr is EventArgsAttribute || attr is DelegateNameAttribute || attr is EventNameAttribute || attr is ObsoleteAttribute || attr is AlphaAttribute || attr is NewAttribute || attr is SinceAttribute || attr is PostGetAttribute || attr is NullAllowedAttribute || attr is CheckDisposedAttribute || attr is SnippetAttribute || attr is LionAttribute || attr is AppearanceAttribute || attr is ThreadSafeAttribute || attr is AutoreleaseAttribute) >>>>>>> } else if (attr is DefaultValueAttribute || attr is DefaultValueFromArgumentAttribute) { seenDefaultValue = true; continue; } else if (attr is NoDefaultValueAttribute) { seenNoDefaultValue = true; continue; } else if (attr is SealedAttribute || attr is EventArgsAttribute || attr is DelegateNameAttribute || attr is EventNameAttribute || attr is ObsoleteAttribute || attr is AlphaAttribute || attr is NewAttribute || attr is SinceAttribute || attr is PostGetAttribute || attr is NullAllowedAttribute || attr is CheckDisposedAttribute || attr is SnippetAttribute || attr is LionAttribute || attr is AppearanceAttribute || attr is ThreadSafeAttribute || attr is AutoreleaseAttribute || attr is EditorBrowsableAttribute) <<<<<<< string wrap; var export = GetExportAttribute (pi, out wrap); bool is_static = HasAttribute (pi, typeof (StaticAttribute)); bool is_thread_static = HasAttribute (pi, typeof (IsThreadStaticAttribute)); bool is_abstract = HasAttribute (pi, typeof (AbstractAttribute)) && pi.DeclaringType == type; bool is_public = !HasAttribute (pi, typeof (InternalAttribute)); bool is_override = HasAttribute (pi, typeof (OverrideAttribute)) || !MemberBelongsToType (pi.DeclaringType, type); bool is_new = HasAttribute (pi, typeof (NewAttribute)); bool is_sealed = HasAttribute (pi, typeof (SealedAttribute)); bool is_unsafe = false; ======= foreach (ObsoleteAttribute oa in pi.GetCustomAttributes (typeof (ObsoleteAttribute), false)) { print ("[Obsolete (\"{0}\", {1})]", oa.Message, oa.IsError ? "true" : "false"); } foreach (DebuggerBrowsableAttribute ba in pi.GetCustomAttributes (typeof (DebuggerBrowsableAttribute), false)) { print ("[DebuggerBrowsable (DebuggerBrowsableState.{0})]", ba.State); } foreach (DebuggerDisplayAttribute da in pi.GetCustomAttributes (typeof (DebuggerDisplayAttribute), false)) { var narg = da.Name != null ? string.Format (", Name = \"{0}\"", da.Name) : string.Empty; var targ = da.Type != null ? string.Format (", Type = \"{0}\"", da.Type) : string.Empty; print ("[DebuggerDisplay (\"{0}\"{1}{2})]", da.Value, narg, targ); } foreach (SinceAttribute sa in pi.GetCustomAttributes (typeof (SinceAttribute), false)) { print ("[Since ({0},{1})]", sa.Major, sa.Minor); } foreach (ThreadSafeAttribute sa in pi.GetCustomAttributes (typeof (ThreadSafeAttribute), false)) { print ("[ThreadSafe]"); } } >>>>>>> foreach (ObsoleteAttribute oa in pi.GetCustomAttributes (typeof (ObsoleteAttribute), false)) print ("[Obsolete (\"{0}\", {1})]", oa.Message, oa.IsError ? "true" : "false"); foreach (DebuggerBrowsableAttribute ba in pi.GetCustomAttributes (typeof (DebuggerBrowsableAttribute), false)) print ("[DebuggerBrowsable (DebuggerBrowsableState.{0})]", ba.State); foreach (DebuggerDisplayAttribute da in pi.GetCustomAttributes (typeof (DebuggerDisplayAttribute), false)) { var narg = da.Name != null ? string.Format (", Name = \"{0}\"", da.Name) : string.Empty; var targ = da.Type != null ? string.Format (", Type = \"{0}\"", da.Type) : string.Empty; print ("[DebuggerDisplay (\"{0}\"{1}{2})]", da.Value, narg, targ); } foreach (SinceAttribute sa in pi.GetCustomAttributes (typeof (SinceAttribute), false)) print ("[Since ({0},{1})]", sa.Major, sa.Minor); foreach (ThreadSafeAttribute sa in pi.GetCustomAttributes (typeof (ThreadSafeAttribute), false)) print ("[ThreadSafe]"); } <<<<<<< ======= if (wrap != null){ print_generated_code (); PrintPropertyAttributes (pi); print ("{0} {1}{2}{3}{4} {5} {{", is_public ? "public" : "internal", is_unsafe ? "unsafe " : "", is_new ? "new " : "", (is_static ? "static " : ""), FormatType (pi.DeclaringType, pi.PropertyType), pi.Name); indent++; if (pi.CanRead) print ("get {{ return {0} as {1}; }}", wrap, FormatType (pi.DeclaringType, pi.PropertyType)); if (pi.CanWrite) print ("set {{ {0} = value; }}", wrap); indent--; print ("}\n"); return; } >>>>>>> if (wrap != null){ print_generated_code (); PrintPropertyAttributes (pi); print ("{0} {1}{2}{3}{4} {5} {{", is_public ? "public" : "internal", is_unsafe ? "unsafe " : "", is_new ? "new " : "", (is_static ? "static " : ""), FormatType (pi.DeclaringType, pi.PropertyType), pi.Name); indent++; if (pi.CanRead) print ("get {{ return {0} as {1}; }}", wrap, FormatType (pi.DeclaringType, pi.PropertyType)); if (pi.CanWrite) print ("set {{ {0} = value; }}", wrap); indent--; print ("}\n"); return; } <<<<<<< foreach (ObsoleteAttribute oa in pi.GetCustomAttributes (typeof (ObsoleteAttribute), false)) { print ("[Obsolete (\"{0}\", {1})]", oa.Message, oa.IsError ? "true" : "false"); } ======= >>>>>>> <<<<<<< print ("[CompilerGenerated]"); print ("static readonly IntPtr {0} = Selector.GetHandle (\"{1}\");", SelectorField (ea), ea); ======= print ("static readonly IntPtr {0} = Selector.GetHandle (\"{1}\");", SelectorField (ea), ea); >>>>>>> print ("[CompilerGenerated]"); print ("static readonly IntPtr {0} = Selector.GetHandle (\"{1}\");", SelectorField (ea), ea); <<<<<<< print ("[CompilerGenerated]"); print ("static IntPtr class_ptr = Class.GetHandle (\"{0}\");\n", is_model ? "NSObject" : objc_type_name); ======= print ("static readonly IntPtr class_ptr = Class.GetHandle (\"{0}\");\n", is_model ? "NSObject" : objc_type_name); >>>>>>> print ("[CompilerGenerated]"); print ("static readonly IntPtr class_ptr = Class.GetHandle (\"{0}\");\n", is_model ? "NSObject" : objc_type_name);
<<<<<<< rootCommand.AddValidator(EnsureFolderNotSpecifiedWithNoRestore); ======= rootCommand.AddValidator(EnsureFolderNotSpecifiedWhenLoggingBinlog); >>>>>>> rootCommand.AddValidator(EnsureFolderNotSpecifiedWithNoRestore); rootCommand.AddValidator(EnsureFolderNotSpecifiedWhenLoggingBinlog); <<<<<<< internal static string? EnsureFolderNotSpecifiedWithNoRestore(CommandResult symbolResult) { var folder = symbolResult.ValueForOption<bool>("--folder"); var noRestore = symbolResult.OptionResult("--no-restore"); return folder && noRestore != null ? Resources.Cannot_specify_the_folder_option_with_no_restore : null; } ======= internal static string? EnsureFolderNotSpecifiedWhenLoggingBinlog(CommandResult symbolResult) { var folder = symbolResult.ValueForOption<bool>("--folder"); var binarylog = symbolResult.OptionResult("--binarylog"); return folder && binarylog is not null && !binarylog.IsImplicit ? Resources.Cannot_specify_the_folder_option_when_writing_a_binary_log : null; } >>>>>>> internal static string? EnsureFolderNotSpecifiedWithNoRestore(CommandResult symbolResult) { var folder = symbolResult.ValueForOption<bool>("--folder"); var noRestore = symbolResult.OptionResult("--no-restore"); return folder && noRestore != null ? Resources.Cannot_specify_the_folder_option_with_no_restore : null; } internal static string? EnsureFolderNotSpecifiedWhenLoggingBinlog(CommandResult symbolResult) { var folder = symbolResult.ValueForOption<bool>("--folder"); var binarylog = symbolResult.OptionResult("--binarylog"); return folder && binarylog is not null && !binarylog.IsImplicit ? Resources.Cannot_specify_the_folder_option_when_writing_a_binary_log : null; }
<<<<<<< dockablePane1.Children.Add(layout); dockablePane1.Children.RemoveElementsNoReturn(d => d.Content == null); ======= dockablePane2.Children.Add(layout); dockablePane2.Children.RemoveElementsNoReturn(d => d.Content == null); layout.IsActive = true; break; case FrmState.Mini2: layout = Factory(name, thisControl); viewitem.Container = layout; dockablePane3.Children.Add(layout); dockablePane3.Children.RemoveElementsNoReturn(d => d.Content == null); >>>>>>> dockablePane1.Children.Add(layout); dockablePane1.Children.RemoveElementsNoReturn(d => d.Content == null); layout.IsActive = true; break; case FrmState.Mini2: layout = Factory(name, thisControl); viewitem.Container = layout; dockablePane1.Children.Add(layout); dockablePane1.Children.RemoveElementsNoReturn(d => d.Content == null);
<<<<<<< // Copyright (c) 2011 - 2014 OJ Reeves & Jeremiah Peschka // Copyright (c) 2014 - Basho Technologies, Inc. ======= // Copyright (c) 2011 - OJ Reeves & Jeremiah Peschka // Copyright (c) 2015 - Basho Technologies, Inc. >>>>>>> // Copyright (c) 2011 - 2014 OJ Reeves & Jeremiah Peschka // Copyright (c) 2014 - Basho Technologies, Inc. <<<<<<< ======= using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Numerics; using System.Web; >>>>>>> using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Numerics; using System.Web; <<<<<<< ======= >>>>>>>
<<<<<<< var result = node.UseConnection(c => c.PbcWriteRead<RpbPingReq, RpbPingResp>(new RpbPingReq())); ======= var result = node.UseConnection(_pollClientId, c => c.PbcWriteRead(MessageCode.PingReq, MessageCode.PingResp)); >>>>>>> var result = node.UseConnection(c => c.PbcWriteRead(MessageCode.PingReq, MessageCode.PingResp));
<<<<<<< var result = _encoder.Decode<TResult>(PbcClientStream); ======= if (Read) { System.Diagnostics.Debugger.Break(); } var data = _socket.Receive(); var result = _encoder.Decode<TResult>(data); Read = true; >>>>>>> var data = _socket.Receive(); var result = _encoder.Decode<TResult>(data); <<<<<<< _encoder.Encode(request, PbcClientStream); ======= if (!Read) { System.Diagnostics.Debugger.Break(); } var data = _encoder.Encode(request); _socket.Send(data); Read = false; >>>>>>> var data = _encoder.Encode(request); _socket.Send(data);
<<<<<<< // <copyright file="BasicSetDtTests.cs" company="Basho Technologies, Inc."> // Copyright (c) 2015 - Basho Technologies ======= // Copyright 2011 - OJ Reeves & Jeremiah Peschka >>>>>>> // <copyright file="BasicSetDtTests.cs" company="Basho Technologies, Inc."> // Copyright 2015 - Basho Technologies