Unable to get FolderPath from RDOFolder - outlook-redemption

I am trying to get the RDOFolder Path, It is possible in Interop.Outlook by coding MAPIFolder.FolderPath
string path = rdoFolder.FolderPath

Both classes provide the FolderPath property:
MAPIFolder.FolderPath
RDOFolder.FolderPath
It is up to you which one is to choose.

FolderPath property is implemented by the IRDOFolder2 interface (derived from RDOFolder).
Try to cast rdoFolder variable to IRDOFolder2

Related

Deedle, F# and read csv

I am facing an issue when I try to use the function Deedle.Frame.ReadCsv
I am trying to use the overload here: https://collective2.com/c2explorer_help/html/806c0295-1a9f-1bf4-50eb-a221419abe06.htm
let schemaSource = "dateRep (DateTime),,,,,,,,,"
let dataSource = Deedle.Frame.ReadCsv(path = "data.csv", schema = schemaSource)
When I do so, I get the following error:
error FS0503: A member or object constructor 'ReadCsv' taking 0 arguments is not accessible from this code location. All accessible versions of method 'ReadCsv' take 9 arguments.
What I do not get is that all but path are optional. If I use just:
Deedle.Frame.ReadCsv("data.csv")
It then works...
Any idea? I tried to find some resources on using overloaded functions from other .Net languages with optional parameters but I have not been successful.
I am not sure why the Intellisense/Signature shown in Visual Studio was wrong but using location = works...

How to create a new data with both string part and a data in bytes, in Swift?

I am making an app which behaves like cloud storage. I need to upload a file with Alamofire. When I am uploading the related file, I need to append a string which holds path like: "folderName/fileName" (which shows the path on my cloud storage app) to my file data in bytes. I can achieve this by using below code in Java:
#Override
protected Map<String, DataPart> getByteData() {
Map<String, DataPart> params = new HashMap<>();
params.put("parameterName", new DataPart("folderName/fileName", fileInBytes));
return params;
}
But I don't know how to do this in Swift. I need to create a new Data with a string and a data, before uploading it with Alamofire. How can I achieve that? Any response will be appreciated.
Thanks everyone who answered me, I've found a solution. I created a structure called DataPart with a string and data, and put that parameter to my Alamofire request with parameter name.
"What is the equivalent of a Java HashMap<String,Integer> in Swift" this entry helped me a lot in case you are wondering.
If I understand correctly, you want to convert your path (of type String) to swift's Data structure, then upload it to your server alongside a joined file's data.
so here's how you can do it-
let path = "folderName/fileName"
let pathEncodedData = path.data(using: .utf8)!
let fileData: Data = #YourFile'sData
let params = ["path": pathEncodedData, "fileData": fileData]

How do I copy DOORS modules between folders/projects using DXL?

I am new to both DOORS and DXL. I've been trying to copy a module in a project template to any given project folder using DXL, but my approaches haven't been working. Here's the part of my script where the copy and paste operations are attempted:
// Where string originalModule is the path to the module being copied.
// Where string targetPath is the path to where the copied module should be pasted.
ModName_ originalMMP = module(originalModule)
string originalMMPdesc = description(originalMMP)
clipCopy(originalMMP)
clipPaste(targetPath)
clipClear()
Whenever I run my script in the DOORS' DXL editor, I get an error indicating that the functions clipCopy() and clipPaste() have invalid arguments. In the DXL reference manual, it indicates that the type of the arguments should be of Item type, but I'm not totally sure I'm understanding that.
I have tried this other approach as well:
// The same conventions as above are used for the originalModule and targetPath
// string type variables.
// The variable string targetPathTemp contains the path to the replicated
// file New Module Temp
ModName_ originalMMP = module(originalModule)
string originalMMPdesc = description(originalMMP)
bool OK = copy(originalMMP,"New Module Temp", originalMMPdesc)
ModName_ newMMP = module(targetPathTemp)
// Moving and Renaming:
ErrMess = move(newMMP, targetPath)
ErrMess = rename(copiedMMP,newModuleName, originalMMPdesc)
I get the same errors as clipCopy() and clipPaste() for the functions: copy() and move().
Does anyone have any idea of what am I doing wrong, and what exactly am I not understanding?
Thanks in advance!
I think clipCopy and its brethren only work with Items. Use Item originalMMP = item(originalModule) instead of ModName_...

Getting ApplicationName

CanĀ“t find a way to get my ApplicationName.
Found a static method to get and set app name but I am not sure how to use it.
Found a very simple way to retrieve my application name:
SqlMembershipProvider msmp = new SqlMembershipProvider();
string appName = msmp.ApplicationName.ToString();
;O)

weird behavior using f# class with redis service stack lib

I'm testing a bit redis using .Net, I've read this tutorial
http://www.d80.co.uk/post/2011/05/12/Redis-Tutorial-with-ServiceStackRedis.aspx
and follow using c# and worked perfect, now when I'm trying translate this to f# I've a weird behavior, first I create a simple f# class (using type didn't work neither but it was expected)...basicaly the class is something like this:
//I ve used [<Class>] to
type Video (id : int, title : string , image : string , url : string) =
member this.Id = id
member this.Title = title
member this.Image = image
member this.Url = url
when I run the code, my db save an empty data, if I use a c# class inside my f# code this work, so I'm sure than the problem is the f# class...How can resolve this without depend c# code inside my f# code
Thanks !!!
Based on your tutorial, it looks like you want your F# Video class to be full of getter and setter properties instead of having a constructor with getters only as it is now (and it is a class, which you can verify by running it through FSI).
You can achieve this using a record type full of mutable fields (which is compiled down to a class type full of public getters and setters):
type Video = {
mutable Id : int
mutable Title : string
mutable Image : byte[]
mutable Url : string
}

Resources