You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2011/03/19 23:42:52 UTC
svn commit: r1083321 -
/chemistry/site/trunk/content/dotnet/powershell-example.mdtext
Author: fmui
Date: Sat Mar 19 22:42:52 2011
New Revision: 1083321
URL: http://svn.apache.org/viewvc?rev=1083321&view=rev
Log:
CMS commit to chemistry by fmui
Modified:
chemistry/site/trunk/content/dotnet/powershell-example.mdtext
Modified: chemistry/site/trunk/content/dotnet/powershell-example.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/dotnet/powershell-example.mdtext?rev=1083321&r1=1083320&r2=1083321&view=diff
==============================================================================
--- chemistry/site/trunk/content/dotnet/powershell-example.mdtext (original)
+++ chemistry/site/trunk/content/dotnet/powershell-example.mdtext Sat Mar 19 22:42:52 2011
@@ -1,5 +1,6 @@
Title: PowerShell Examples
-# PowerShell Examples
+
+# PowerShell Example
The DotCMIS DLL can be used in PowerShell scripts. Here is a simple example.
@@ -11,7 +12,7 @@ The DotCMIS DLL can be used in PowerShel
# -----------------------------------------------------------------
# helper functions
- function New-GenericDictionary([type] $keyType, [type]$valueType) {
+ function New-GenericDictionary([type] $keyType, [type] $valueType) {
$base = [System.Collections.Generic.Dictionary``2]
$ct = $base.MakeGenericType(($keyType, $valueType))
New-Object $ct
@@ -49,21 +50,21 @@ The DotCMIS DLL can be used in PowerShel
# create session
$sp = New-GenericDictionary string string
- $sp["org.apache.chemistry.dotcmis.binding.spi.type"] = "atompub";
+ $sp["org.apache.chemistry.dotcmis.binding.spi.type"] = "atompub"
$sp["org.apache.chemistry.dotcmis.binding.atompub.url"] = "http://localhost:8080/alfresco/service/cmis"
- $sp["org.apache.chemistry.dotcmis.user"] = "admin";
- $sp["org.apache.chemistry.dotcmis.password"] = "admin";
+ $sp["org.apache.chemistry.dotcmis.user"] = "admin"
+ $sp["org.apache.chemistry.dotcmis.password"] = "admin"
$factory = [DotCMIS.Client.Impl.SessionFactory]::NewInstance()
$session = $factory.GetRepositories($sp)[0].CreateSession()
# print the repository infos
- $session.Repositoryinfo.Id
- $session.Repositoryinfo.Name
- $session.Repositoryinfo.Vendor
- $session.Repositoryinfo.ProductName
- $session.Repositoryinfo.ProductVersion
+ $session.RepositoryInfo.Id
+ $session.RepositoryInfo.Name
+ $session.RepositoryInfo.Vendor
+ $session.RepositoryInfo.ProductName
+ $session.RepositoryInfo.ProductVersion
# get root folder