How to pass additional arguments for Fragment info in MVVMCross - xamarin.android

The solution is built using MVVMCross.
I have few fragments like this example
new MvxCachingFragmentStatePagerAdapter.FragmentInfo("RecyclerView 1", typeof (RecyclerViewFragment),
typeof (RecyclerViewModel),"ABD")
I need to pass an additional argument into this fragment info. The fourth argument. But i don't know how to retrieve the argument in the on create method. For example the ABD string is the additional parameter. How can i get this at the other end?Can anybody help?

Related

Include multiple parameters inside SAML RelayState parameter

Basically have an issue when I set the RelayState parameter to /test/example?key=value&key1=value1 , key1=value1 is being split away from the RelayState parameter instead of being included in it like "/test/example?key=value&key1=value1". I would be grateful for any assistance. Thanks
I resolved this myself, basically when you build the page reference in apex code, you should only use the base url in the constructor, no parameters. Then, you add the parameters to the Page Reference's parameter map variable. That way the parameter is not split. Thanks!

How to set Flow variables with data returned from Function?

https://www.twilio.com/docs/studio/widget-library#run-function
When you invoke a Function, you have two possible options for using variables: (1) you can pass Flow variables as parameters into a Function (e.g. flow.data.foo), and (2) you may set Flow variables with data returned from the Function (TwiML or JSON can be returned).
Does anyone know how to set Flow variables with data returned from a Function?
You should be able to follow the Liquid Syntax documented here, to do so.
Liquid Template Language - Assigning Variables
https://www.twilio.com/docs/studio/user-guide/liquid-template-language#variable-assignment
Or just call the returned variable by addressing the Function widget as shown at the link below:
https://www.twilio.com/docs/studio/widget-library#run-function
widgets.MY_FUCTION_WIDGET_NAME.parsed.xxxxx (where xxxxx is the JSON path).
Alan

Using primitive type parameter in OCMVerify

I am using OCMock as a mocking framework in my iOS project. When I try to use OCVerify functionality to test that a certain method is invoked, I came across a problem of passing primitive types as parameters.
Here is an example to show problem:
1-) Cases successfully verify invocation when no parameter or an object parameter.
OCMVerify([mockedClass methodToCall])
OCMVerify([mockedClass methodWithObjectParameter:[OCMArg any]);
2-) When I want to verify a method that takes an int as a parameter:
OCMVerify([mockedClass methodWithIntParameter:[OCMArg any]);
In this case [OCMArg any] doesn't act like as expected. It returns an actual integer and that causes a mismatch of parameter values. In reality I do not care if that integer value is correct or not. My only consideration is if the method is called with any integer regardless of its value.
I want to know that is there a way to have exact same effect of [OCMArg any] has on objects when using primitive types as parameters?
Please see section 4 in the documentation.

What does Database.AddInParameter() method do?

I was debugging datahandler for an mvc4 application, and I came across the
AddInParameter(DbCommand, String, DbType);
and I looked for the same in MSDN, but there its mentioned as retired content and there is not much documentation. So please anybody help me to understand what it does?
1st Parameter, DbCommand - is the command you want to execute on your database, e.g. StoredProc, SqlString etc.
2nd Parameter, Parameter Name - is the name of your parameter
3rd DbType, DbType - is the type of your parameter e.g. String
Basically this will add an Input parameter which can be used in your DbCommand. The AddInParmeter method works similarly like the SqlCommand.Parameters.Add() of the System.Data.SqlClient namespace.

Implement command-ine arguments functionality using MVVM Light

I need to implement localization using commandline arguments.
I got an answer for this
string[] cmd = Environment.GetCommandLineArgs();
What this will do is it will add all the arguments You pass through Cmd in an string Array and then you can make use of those passed arguments for a particular functionality.
As In my case if I pass "eng" as command line argument the whole application will get tht "eng" culture.
So this is how I implemented Localization using CommandLineArguments.

Resources