Hi. I'm using Ice 3.4.1 on Windows XP with Visual Studio 2010. slice2cs doesn't seem to be generating C# classes for my maps. Running slice2cs on the following code produces the output included below. I just installed 3.4.1 (upgrading from 3.2.1), and I uninstalled 3.2.1 in case slice2cs 3.4.1 was somehow loading DLLs from 3.2.1 or something like that. Any ideas what I might be doing wrong?
// ************************************************** ******
// Test Ice file.
// ************************************************** ******
#ifndef SLICE_TEST_ICE
#define SLICE_TEST_ICE
module SliceTest {
dictionary<string, string> StringMap;
};
#endif
// ******
// Output
// ******
// ************************************************** ********************
//
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// ************************************************** ********************
// Ice version 3.4.1
// <auto-generated>
//
// Generated from file `SliceTest.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
using _System = global::System;
using _Microsoft = global::Microsoft;
#pragma warning disable 1591
namespace SliceTest
{
}
namespace SliceTest
{
[_System.CodeDom.Compiler.GeneratedCodeAttribute("s lice2cs", "3.4.1")]
public sealed class StringMapHelper
{
public static void write(IceInternal.BasicStream os__,
_System.Collections.Generic.Dictionary<string, string> v__)
{
if(v__ == null)
{
os__.writeSize(0);
}
else
{
os__.writeSize(v__.Count);
foreach(_System.Collections.Generic.KeyValuePair<s tring, string> e__ in v__)
{
os__.writeString(e__.Key);
os__.writeString(e__.Value);
}
}
}
public static _System.Collections.Generic.Dictionary<string, string> read(IceInternal.BasicStream is__)
{
int sz__ = is__.readSize();
_System.Collections.Generic.Dictionary<string, string> r__ = new _System.Collections.Generic.Dictionary<string, string>();
for(int i__ = 0; i__ < sz__; ++i__)
{
string k__;
k__ = is__.readString();
string v__;
v__ = is__.readString();
r__[k__] = v__;
}
return r__;
}
}
}

Reply With Quote