Added Input pasted event and added to all modes (#593)
This commit is contained in:
parent
aea12015bd
commit
bb027aa9c3
@ -33,6 +33,7 @@ namespace CalculatorApp
|
|||||||
constexpr auto EVENT_NAME_MEMORY_ITEM_LOAD = L"MemoryItemLoad";
|
constexpr auto EVENT_NAME_MEMORY_ITEM_LOAD = L"MemoryItemLoad";
|
||||||
constexpr auto EVENT_NAME_VISUAL_STATE_CHANGED = L"VisualStateChanged";
|
constexpr auto EVENT_NAME_VISUAL_STATE_CHANGED = L"VisualStateChanged";
|
||||||
constexpr auto EVENT_NAME_CONVERTER_INPUT_RECEIVED = L"ConverterInputReceived";
|
constexpr auto EVENT_NAME_CONVERTER_INPUT_RECEIVED = L"ConverterInputReceived";
|
||||||
|
constexpr auto EVENT_NAME_INPUT_PASTED = L"InputPasted";
|
||||||
|
|
||||||
constexpr auto EVENT_NAME_EXCEPTION = L"Exception";
|
constexpr auto EVENT_NAME_EXCEPTION = L"Exception";
|
||||||
|
|
||||||
@ -369,4 +370,16 @@ namespace CalculatorApp
|
|||||||
fields.AddUInt64(PDT_PRIVACY_DATA_TAG, PDT_PRODUCT_AND_SERVICE_USAGE);
|
fields.AddUInt64(PDT_PRIVACY_DATA_TAG, PDT_PRODUCT_AND_SERVICE_USAGE);
|
||||||
LogLevel2Event(EVENT_NAME_NAV_BAR_OPENED, fields);
|
LogLevel2Event(EVENT_NAME_NAV_BAR_OPENED, fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TraceLogger::LogInputPasted(ViewMode mode) const
|
||||||
|
{
|
||||||
|
if (!GetTraceLoggingProviderEnabled())
|
||||||
|
return;
|
||||||
|
|
||||||
|
LoggingFields fields{};
|
||||||
|
fields.AddGuid(L"SessionGuid", sessionGuid);
|
||||||
|
fields.AddString(L"Mode", NavCategory::GetFriendlyName(mode)->Data());
|
||||||
|
fields.AddUInt64(PDT_PRIVACY_DATA_TAG, PDT_PRODUCT_AND_SERVICE_USAGE);
|
||||||
|
LogLevel2Event(EVENT_NAME_INPUT_PASTED, fields);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ namespace CalculatorApp
|
|||||||
void LogStandardException(CalculatorApp::Common::ViewMode mode, std::wstring_view functionName, _In_ const std::exception& e) const;
|
void LogStandardException(CalculatorApp::Common::ViewMode mode, std::wstring_view functionName, _In_ const std::exception& e) const;
|
||||||
void LogWinRTException(CalculatorApp::Common::ViewMode mode, std::wstring_view functionName, _In_ winrt::hresult_error const& e) const;
|
void LogWinRTException(CalculatorApp::Common::ViewMode mode, std::wstring_view functionName, _In_ winrt::hresult_error const& e) const;
|
||||||
void LogPlatformException(CalculatorApp::Common::ViewMode mode, std::wstring_view functionName, _In_ Platform::Exception ^ e) const;
|
void LogPlatformException(CalculatorApp::Common::ViewMode mode, std::wstring_view functionName, _In_ Platform::Exception ^ e) const;
|
||||||
|
void LogInputPasted(CalculatorApp::Common::ViewMode mode) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Create an instance of TraceLogger
|
// Create an instance of TraceLogger
|
||||||
|
@ -765,6 +765,7 @@ void StandardCalculatorViewModel::OnPaste(String ^ pastedString)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TraceLogger::GetInstance().LogInputPasted(GetCalculatorMode());
|
||||||
bool isFirstLegalChar = true;
|
bool isFirstLegalChar = true;
|
||||||
m_standardCalculatorManager.SendCommand(Command::CommandCENTR);
|
m_standardCalculatorManager.SendCommand(Command::CommandCENTR);
|
||||||
bool sendNegate = false;
|
bool sendNegate = false;
|
||||||
|
@ -893,6 +893,7 @@ void UnitConverterViewModel::OnPaste(String ^ stringToPaste)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TraceLogger::GetInstance().LogInputPasted(Mode);
|
||||||
bool isFirstLegalChar = true;
|
bool isFirstLegalChar = true;
|
||||||
bool sendNegate = false;
|
bool sendNegate = false;
|
||||||
wstring accumulation = L"";
|
wstring accumulation = L"";
|
||||||
|
Loading…
Reference in New Issue
Block a user