本文整理汇总了C#中Ice.setProperties方法的典型用法代码示例。如果您正苦于以下问题:C# Ice.setProperties方法的具体用法?C# Ice.setProperties怎么用?C# Ice.setProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ice
的用法示例。
在下文中一共展示了Ice.setProperties方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: updateProps
static void updateProps(Ice.PropertiesAdminPrx cprops,
Ice.PropertiesAdminPrx sprops,
UpdateCallbackI callback,
Dictionary<string, string> props,
string map)
{
if(sprops.ice_getConnection() != null)
{
cprops.setProperties(getClientProps(cprops, props, map));
sprops.setProperties(getServerProps(sprops, props, map));
}
else
{
Dictionary<string, string> clientProps = getClientProps(cprops, props, map);
Dictionary<string, string> serverProps = getClientProps(sprops, props, map);
foreach(KeyValuePair<string, string> p in clientProps)
{
if(!serverProps.ContainsKey(p.Key))
{
serverProps.Add(p.Key, p.Value);
}
}
cprops.setProperties(serverProps);
}
callback.waitForUpdate();
}
示例2: clearView
static void clearView(Ice.PropertiesAdminPrx cprops, Ice.PropertiesAdminPrx sprops, UpdateCallbackI callback)
{
Dictionary<string, string> dict;
dict = cprops.getPropertiesForPrefix("IceMX.Metrics");
dict["IceMX.Metrics.View.Disabled"] = "1";
cprops.setProperties(dict);
dict = sprops.getPropertiesForPrefix("IceMX.Metrics");
dict["IceMX.Metrics.View.Disabled"] = "1";
sprops.setProperties(dict);
callback.waitForUpdate();
dict = cprops.getPropertiesForPrefix("IceMX.Metrics");
dict["IceMX.Metrics.View.Disabled"] = "";
cprops.setProperties(dict);
dict = sprops.getPropertiesForPrefix("IceMX.Metrics");
dict["IceMX.Metrics.View.Disabled"] = "";
sprops.setProperties(dict);
callback.waitForUpdate();
}
示例3: testAttribute
static void testAttribute(IceMX.MetricsAdminPrx metrics,
Ice.PropertiesAdminPrx props,
UpdateCallbackI update,
string map,
string attr,
string value,
System.Action func)
{
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("IceMX.Metrics.View.Map." + map + ".GroupBy", attr);
if(props.ice_getIdentity().category.Equals("client"))
{
props.setProperties(getClientProps(props, dict, map));
update.waitForUpdate();
}
else
{
props.setProperties(getServerProps(props, dict, map));
props.setProperties(new Dictionary<string, string>());
}
func();
long timestamp;
Dictionary<string, IceMX.Metrics[]> view = metrics.getMetricsView("View", out timestamp);
if(!view.ContainsKey(map) || view[map].Length == 0)
{
if(value.Length > 0)
{
WriteLine("no map `" + map + "' for group by = `" + attr + "'");
test(false);
}
}
else if(!view[map][0].id.Equals(value))
{
WriteLine("invalid attribute value: " + attr + " = " + value + " got " + view[map][0].id);
test(false);
}
dict.Clear();
if(props.ice_getIdentity().category.Equals("client"))
{
props.setProperties(getClientProps(props, dict, map));
update.waitForUpdate();
}
else
{
props.setProperties(getServerProps(props, dict, map));
props.setProperties(new Dictionary<string, string>());
}
}