NEST trying to convert enum to string - elasticsearch

Good day:
I have the following code however, I'm getting the following error:
return new ConnectionSettings(pool, (s, v) => s.Converters.Add(new StringEnumConverter())).DefaultIndex(index)
.DefaultMappingFor<Document>(m => m.IndexName(index).TypeName("doc"))
.DefaultMappingFor<FacilityType>(m => m.IndexName(index).TypeName("doc"))
.DefaultMappingFor<Facility>(m => m.IndexName(index).TypeName("doc").RelationName("parent"))
.BasicAuthentication(ConfigurationManager.AppSettings["ElasticUser"], ConfigurationManager.AppSettings["ElasticPassword"]);
Severity Code Description Project File Line Suppression State
Error CS1061 'IElasticsearchSerializer' does not contain a definition for 'Converters' and no extension method 'Converters' accepting a first argument of type 'IElasticsearchSerializer' could be found (are you missing a using directive or an assembly reference?) iserro.API C:\Users\IEUser\source\repos\iserro-api\iserro.API\App_Start\DiContainerConfig.cs 131 Active

I think the error message clearly indicates what the problem is.
It looks like you'd like IElasticsearchSerializer to be a concrete instance that exposes a Converters property, which the JsonNetSerializer type in the Nest.JsonNetSerializer NuGet package exposes so you can hook it up and add custom converters.

Related

convert object from one assembly to another cli c++

I have an multi Module Project. Here we are passing System::Object^ from one exe to code from another DLL.
When I am trying to convert that Object to its type(Here we have the same definition) in DLL, I am getting the below error...
[A] can not be cast to [B]; A originates from one assembly , b from another
I tried through some documents but could not crack through.
Both the below code giving that conversion error
LocalClassType ^x1 = LocalClassType (x);
LocalClassType ^x2 = cli::safe_cast<LocalClassType ^>(x)
Can anyone please suggest or guide me through the document where I can convert correctly.
I was able to resolve the issue, and cast it using static_cast
LocalClassType ^x2 = static_cast<LocalClassType ^>(x)

MvvmCross Version 4 Custom Binding

I have an app that has been running on MvvmCross 3 for about a year. I decided to go for the update and use version 4. I have worked through most of the issues, but I am hung up on the following error:
'MvvmCross.Binding.Bindings.Target.Construction.IMvxTargetBindingFactoryRegistry'
does not contain a definition for 'RegisterCustomBindingFactory' and
no extension method 'RegisterCustomBindingFactory' accepting a first
argument of type
'MvvmCross.Binding.Bindings.Target.Construction.IMvxTargetBindingFactoryRegistry'
could be found (are you missing a using directive or an assembly
reference?)
In my Setup.cs I have this
protected override void FillTargetFactories(
MvvmCross.Binding.Bindings.Target.Construction.IMvxTargetBindingFactoryRegistry registry)
{
base.FillTargetFactories(registry);
registry.RegisterCustomBindingFactory<EditText>("FocusText",
textView => new MvxEditTextFocusBinding(textView));
registry.RegisterCustomBindingFactory<EditText>("FocusChange",
editText => new MvxEditTextFocusChangeBinding(editText));
}
Is there a replacement for RegisterCustomBindingFactory?
PlaceHold3r was correct. I hadn't included
using MvvmCross.Binding.Bindings.Target.Construction;
so the name space was missing.

Unable to use .Pdf functions to customize the data in Kendo Grid pdf export

I am trying to export kendo grid data to PDF. It’s all working fine but it’s not allowing me to use some function of pdf method like RepeatHeaders and few more. here's my code
.ToolBar(tools => tools.Pdf())
.Pdf(pdf => pdf
.AllPages()
.Margin("2cm", "1cm", "1cm", "1cm")
.RepeatHeaders()
.Subject("ABC Subject")
.FileName("ABC.pdf")
.Title("Report: ABC")
)
Here the error:
Compiler Error Message: CS1061: 'PDFSettingsBuilder' does not contain
a definition for 'RepeatHeaders' and no extension method
'RepeatHeaders' accepting a first argument of type
'PDFSettingsBuilder' could be found (are you missing a using directive
or an assembly reference?)
I'm using Kendo.Mvc version 2015.3.1111.545 (Runtime version v4.0.30319)
How would I use these functions to customize data in pdf?

xercesc NodeType not declared

I am developing an application to read XML files using xerces-c-3.1.1 using C++ on Netbeans 8.0.1.
I have a variable defined as type DOMNode* as follows
DOMNode* attribute=attributes->item(aIndex);
When I expand attribute in the debugger, it displays a function, getNodeType(), that returns a variable of type. However,when I add the code
NodeType value=attribute->getNodeType();
I get the error message
error: ‘NodeType’ was not declared in this scope
You could try xercesc::DOMNode::NodeType instead of writing NodeType.

ORA-06508: PL/SQL: could not find program unit being called in Package AR_RECEIPT_API_PUB Procedure Unapply

I am getting the following error when one of the custom Oracle Concurrent program is trying to unapply the Oracle AR receipt. Please find the code snippet below.
Now if I were to check the invalid objects i do not see any AR related packages as invalid including AR_RECEIPT_API_PUB.
Any pointers would be helpful.
ORA-06508: PL/SQL: could not find program unit being called in Package AR_RECEIPT_API_PUB Procedure Unapply
ar_receipt_api_pub.unapply(p_api_version => 1.0
,p_init_msg_list => fnd_api.g_true
,p_receivable_application_id => r_appn_cur.rcv_app_id
,p_org_id => r_appn_cur.org_id
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data);
if the package exist and have no errors, problably the user is trying to use it , has no access to it. just to verify, try creating public synonym for the package and try it.
have u ensured that all the required api parameters are being set.
You are getting the error may be because compiler is not able to find the exact declaration of the package.

Resources