You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/11/11 10:12:50 UTC
[03/24] ignite git commit: IGNITE-1845: Adopted new binary API in
.Net.
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/TypeResolver.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/TypeResolver.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/TypeResolver.cs
deleted file mode 100644
index 8a738c2..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/TypeResolver.cs
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Impl.Portable
-{
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Diagnostics.CodeAnalysis;
- using System.Globalization;
- using System.Linq;
- using System.Reflection;
- using System.Text.RegularExpressions;
-
- /// <summary>
- /// Resolves types by name.
- /// </summary>
- internal class TypeResolver
- {
- /** Regex to parse generic types from portable configuration. Allows nested generics in type arguments. */
- private static readonly Regex GenericTypeRegex =
- new Regex(@"([^`,\[\]]*)(?:`[0-9]+)?(?:\[((?:(?<br>\[)|(?<-br>\])|[^\[\]]*)+)\])?", RegexOptions.Compiled);
-
- /** Assemblies loaded in ReflectionOnly mode. */
- private readonly Dictionary<string, Assembly> _reflectionOnlyAssemblies = new Dictionary<string, Assembly>();
-
- /// <summary>
- /// Resolve type by name.
- /// </summary>
- /// <param name="typeName">Name of the type.</param>
- /// <param name="assemblyName">Optional, name of the assembly.</param>
- /// <returns>
- /// Resolved type.
- /// </returns>
- public Type ResolveType(string typeName, string assemblyName = null)
- {
- Debug.Assert(!string.IsNullOrEmpty(typeName));
-
- return ResolveType(assemblyName, typeName, AppDomain.CurrentDomain.GetAssemblies())
- ?? ResolveTypeInReferencedAssemblies(assemblyName, typeName);
- }
-
- /// <summary>
- /// Resolve type by name in specified assembly set.
- /// </summary>
- /// <param name="assemblyName">Name of the assembly.</param>
- /// <param name="typeName">Name of the type.</param>
- /// <param name="assemblies">Assemblies to look in.</param>
- /// <returns>
- /// Resolved type.
- /// </returns>
- private static Type ResolveType(string assemblyName, string typeName, ICollection<Assembly> assemblies)
- {
- return ResolveGenericType(assemblyName, typeName, assemblies) ??
- ResolveNonGenericType(assemblyName, typeName, assemblies);
- }
-
- /// <summary>
- /// Resolves non-generic type by searching provided assemblies.
- /// </summary>
- /// <param name="assemblyName">Name of the assembly.</param>
- /// <param name="typeName">Name of the type.</param>
- /// <param name="assemblies">The assemblies.</param>
- /// <returns>Resolved type, or null.</returns>
- private static Type ResolveNonGenericType(string assemblyName, string typeName, ICollection<Assembly> assemblies)
- {
- if (!string.IsNullOrEmpty(assemblyName))
- assemblies = assemblies
- .Where(x => x.FullName == assemblyName || x.GetName().Name == assemblyName).ToArray();
-
- if (!assemblies.Any())
- return null;
-
- // Trim assembly qualification
- var commaIdx = typeName.IndexOf(',');
-
- if (commaIdx > 0)
- typeName = typeName.Substring(0, commaIdx);
-
- return assemblies.Select(a => a.GetType(typeName, false, false)).FirstOrDefault(type => type != null);
- }
-
- /// <summary>
- /// Resolves the name of the generic type by resolving each generic arg separately
- /// and substituting it's fully qualified name.
- /// (Assembly.GetType finds generic types only when arguments are fully qualified).
- /// </summary>
- /// <param name="assemblyName">Name of the assembly.</param>
- /// <param name="typeName">Name of the type.</param>
- /// <param name="assemblies">Assemblies</param>
- /// <returns>Fully qualified generic type name, or null if argument(s) could not be resolved.</returns>
- private static Type ResolveGenericType(string assemblyName, string typeName, ICollection<Assembly> assemblies)
- {
- var match = GenericTypeRegex.Match(typeName);
-
- if (!match.Success || !match.Groups[2].Success)
- return null;
-
- // Try to construct generic type; each generic arg can also be a generic type.
- var genericArgs = GenericTypeRegex.Matches(match.Groups[2].Value)
- .OfType<Match>().Select(m => m.Value).Where(v => !string.IsNullOrWhiteSpace(v))
- .Select(v => ResolveType(null, TrimBrackets(v), assemblies)).ToArray();
-
- if (genericArgs.Any(x => x == null))
- return null;
-
- var genericType = ResolveNonGenericType(assemblyName,
- string.Format(CultureInfo.InvariantCulture, "{0}`{1}", match.Groups[1].Value, genericArgs.Length),
- assemblies);
-
- if (genericType == null)
- return null;
-
- return genericType.MakeGenericType(genericArgs);
- }
-
- /// <summary>
- /// Trims the brackets from generic type arg.
- /// </summary>
- private static string TrimBrackets(string s)
- {
- return s.StartsWith("[", StringComparison.Ordinal) && s.EndsWith("]", StringComparison.Ordinal)
- ? s.Substring(1, s.Length - 2)
- : s;
- }
-
- /// <summary>
- /// Resolve type by name in non-loaded referenced assemblies.
- /// </summary>
- /// <param name="assemblyName">Name of the assembly.</param>
- /// <param name="typeName">Name of the type.</param>
- /// <returns>
- /// Resolved type.
- /// </returns>
- private Type ResolveTypeInReferencedAssemblies(string assemblyName, string typeName)
- {
- ResolveEventHandler resolver = (sender, args) => GetReflectionOnlyAssembly(args.Name);
-
- AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += resolver;
-
- try
- {
- var result = ResolveType(assemblyName, typeName, GetNotLoadedReferencedAssemblies().ToArray());
-
- if (result == null)
- return null;
-
- // result is from ReflectionOnly assembly, load it properly into current domain
- var asm = AppDomain.CurrentDomain.Load(result.Assembly.GetName());
-
- return asm.GetType(result.FullName);
- }
- finally
- {
- AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve -= resolver;
- }
- }
-
- /// <summary>
- /// Gets the reflection only assembly.
- /// </summary>
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
- private Assembly GetReflectionOnlyAssembly(string fullName)
- {
- Assembly result;
-
- if (!_reflectionOnlyAssemblies.TryGetValue(fullName, out result))
- {
- try
- {
- result = Assembly.ReflectionOnlyLoad(fullName);
- }
- catch (Exception)
- {
- // Some assemblies may fail to load
- result = null;
- }
-
- _reflectionOnlyAssemblies[fullName] = result;
- }
-
- return result;
- }
-
- /// <summary>
- /// Recursively gets all referenced assemblies for current app domain, excluding those that are loaded.
- /// </summary>
- private IEnumerable<Assembly> GetNotLoadedReferencedAssemblies()
- {
- var roots = new Stack<Assembly>(AppDomain.CurrentDomain.GetAssemblies());
-
- var visited = new HashSet<string>();
-
- var loaded = new HashSet<string>(roots.Select(x => x.FullName));
-
- while (roots.Any())
- {
- var asm = roots.Pop();
-
- if (visited.Contains(asm.FullName))
- continue;
-
- if (!loaded.Contains(asm.FullName))
- yield return asm;
-
- visited.Add(asm.FullName);
-
- foreach (var refAsm in asm.GetReferencedAssemblies()
- .Where(x => !visited.Contains(x.FullName))
- .Where(x => !loaded.Contains(x.FullName))
- .Select(x => GetReflectionOnlyAssembly(x.FullName))
- .Where(x => x != null))
- roots.Push(refAsm);
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceContext.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceContext.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceContext.cs
index f5674f3..2532b70 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceContext.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceContext.cs
@@ -19,7 +19,7 @@ namespace Apache.Ignite.Core.Impl.Services
{
using System;
using System.Diagnostics;
- using Apache.Ignite.Core.Portable;
+ using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Services;
/// <summary>
@@ -31,7 +31,7 @@ namespace Apache.Ignite.Core.Impl.Services
/// Initializes a new instance of the <see cref="ServiceContext"/> class.
/// </summary>
/// <param name="reader">The reader.</param>
- public ServiceContext(IPortableRawReader reader)
+ public ServiceContext(IBinaryRawReader reader)
{
Debug.Assert(reader != null);
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceDescriptor.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceDescriptor.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceDescriptor.cs
index 9bd9814..f2806ff 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceDescriptor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceDescriptor.cs
@@ -20,8 +20,8 @@ namespace Apache.Ignite.Core.Impl.Services
using System;
using System.Collections.Generic;
using System.Diagnostics;
+ using Apache.Ignite.Core.Impl.Binary;
using Apache.Ignite.Core.Impl.Collections;
- using Apache.Ignite.Core.Impl.Portable;
using Apache.Ignite.Core.Services;
/// <summary>
@@ -41,7 +41,7 @@ namespace Apache.Ignite.Core.Impl.Services
/// <param name="name">Name.</param>
/// <param name="reader">Reader.</param>
/// <param name="services">Services.</param>
- public ServiceDescriptor(string name, PortableReaderImpl reader, IServices services)
+ public ServiceDescriptor(string name, BinaryReader reader, IServices services)
{
Debug.Assert(reader != null);
Debug.Assert(services != null);
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs
index e7af8da..e49fbf1 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs
@@ -20,9 +20,9 @@ namespace Apache.Ignite.Core.Impl.Services
using System;
using System.Diagnostics;
using System.Reflection;
- using Apache.Ignite.Core.Impl.Portable;
- using Apache.Ignite.Core.Impl.Portable.IO;
- using Apache.Ignite.Core.Portable;
+ using Apache.Ignite.Core.Binary;
+ using Apache.Ignite.Core.Impl.Binary;
+ using Apache.Ignite.Core.Impl.Binary.IO;
using Apache.Ignite.Core.Services;
/// <summary>
@@ -36,7 +36,7 @@ namespace Apache.Ignite.Core.Impl.Services
/// <param name="writer">Writer.</param>
/// <param name="method">Method.</param>
/// <param name="arguments">Arguments.</param>
- public static void WriteProxyMethod(PortableWriterImpl writer, MethodBase method, object[] arguments)
+ public static void WriteProxyMethod(BinaryWriter writer, MethodBase method, object[] arguments)
{
Debug.Assert(writer != null);
Debug.Assert(method != null);
@@ -62,12 +62,12 @@ namespace Apache.Ignite.Core.Impl.Services
/// <param name="marsh">Marshaller.</param>
/// <param name="mthdName">Method name.</param>
/// <param name="mthdArgs">Method arguments.</param>
- public static void ReadProxyMethod(IPortableStream stream, PortableMarshaller marsh,
+ public static void ReadProxyMethod(IBinaryStream stream, Marshaller marsh,
out string mthdName, out object[] mthdArgs)
{
var reader = marsh.StartUnmarshal(stream);
- var srvKeepPortable = reader.ReadBoolean();
+ var srvKeepBinary = reader.ReadBoolean();
mthdName = reader.ReadString();
@@ -75,7 +75,7 @@ namespace Apache.Ignite.Core.Impl.Services
{
mthdArgs = new object[reader.ReadInt()];
- if (srvKeepPortable)
+ if (srvKeepBinary)
reader = marsh.StartUnmarshal(stream, true);
for (var i = 0; i < mthdArgs.Length; i++)
@@ -92,7 +92,7 @@ namespace Apache.Ignite.Core.Impl.Services
/// <param name="marsh">Marshaller.</param>
/// <param name="methodResult">Method result.</param>
/// <param name="invocationError">Method invocation error.</param>
- public static void WriteInvocationResult(IPortableStream stream, PortableMarshaller marsh, object methodResult,
+ public static void WriteInvocationResult(IBinaryStream stream, Marshaller marsh, object methodResult,
Exception invocationError)
{
Debug.Assert(stream != null);
@@ -100,7 +100,7 @@ namespace Apache.Ignite.Core.Impl.Services
var writer = marsh.StartMarshal(stream);
- PortableUtils.WriteInvocationResult(writer, invocationError == null, invocationError ?? methodResult);
+ BinaryUtils.WriteInvocationResult(writer, invocationError == null, invocationError ?? methodResult);
}
/// <summary>
@@ -108,31 +108,31 @@ namespace Apache.Ignite.Core.Impl.Services
/// </summary>
/// <param name="stream">Stream.</param>
/// <param name="marsh">Marshaller.</param>
- /// <param name="keepPortable">Portable flag.</param>
+ /// <param name="keepBinary">Binary flag.</param>
/// <returns>
/// Method invocation result, or exception in case of error.
/// </returns>
- public static object ReadInvocationResult(IPortableStream stream, PortableMarshaller marsh, bool keepPortable)
+ public static object ReadInvocationResult(IBinaryStream stream, Marshaller marsh, bool keepBinary)
{
Debug.Assert(stream != null);
Debug.Assert(marsh != null);
- var mode = keepPortable ? PortableMode.ForcePortable : PortableMode.Deserialize;
+ var mode = keepBinary ? BinaryMode.ForceBinary : BinaryMode.Deserialize;
var reader = marsh.StartUnmarshal(stream, mode);
object err;
- var res = PortableUtils.ReadInvocationResult(reader, out err);
+ var res = BinaryUtils.ReadInvocationResult(reader, out err);
if (err == null)
return res;
- var portErr = err as IPortableObject;
+ var binErr = err as IBinaryObject;
- throw portErr != null
- ? new ServiceInvocationException("Proxy method invocation failed with a portable error. " +
- "Examine PortableCause for details.", portErr)
+ throw binErr != null
+ ? new ServiceInvocationException("Proxy method invocation failed with a binary error. " +
+ "Examine BinaryCause for details.", binErr)
: new ServiceInvocationException("Proxy method invocation failed with an exception. " +
"Examine InnerException for details.", (Exception) err);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs
index fe1a146..2360558 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/Services.cs
@@ -24,8 +24,8 @@ namespace Apache.Ignite.Core.Impl.Services
using System.Reflection;
using System.Threading.Tasks;
using Apache.Ignite.Core.Cluster;
+ using Apache.Ignite.Core.Impl.Binary;
using Apache.Ignite.Core.Impl.Common;
- using Apache.Ignite.Core.Impl.Portable;
using Apache.Ignite.Core.Impl.Unmanaged;
using Apache.Ignite.Core.Services;
using UU = Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils;
@@ -53,11 +53,11 @@ namespace Apache.Ignite.Core.Impl.Services
/** */
private readonly IClusterGroup _clusterGroup;
- /** Invoker portable flag. */
- private readonly bool _keepPortable;
+ /** Invoker binary flag. */
+ private readonly bool _keepBinary;
- /** Server portable flag. */
- private readonly bool _srvKeepPortable;
+ /** Server binary flag. */
+ private readonly bool _srvKeepBinary;
/** Async instance. */
private readonly Lazy<Services> _asyncInstance;
@@ -68,17 +68,17 @@ namespace Apache.Ignite.Core.Impl.Services
/// <param name="target">Target.</param>
/// <param name="marsh">Marshaller.</param>
/// <param name="clusterGroup">Cluster group.</param>
- /// <param name="keepPortable">Invoker portable flag.</param>
- /// <param name="srvKeepPortable">Server portable flag.</param>
- public Services(IUnmanagedTarget target, PortableMarshaller marsh, IClusterGroup clusterGroup,
- bool keepPortable, bool srvKeepPortable)
+ /// <param name="keepBinary">Invoker binary flag.</param>
+ /// <param name="srvKeepBinary">Server binary flag.</param>
+ public Services(IUnmanagedTarget target, Marshaller marsh, IClusterGroup clusterGroup,
+ bool keepBinary, bool srvKeepBinary)
: base(target, marsh)
{
Debug.Assert(clusterGroup != null);
_clusterGroup = clusterGroup;
- _keepPortable = keepPortable;
- _srvKeepPortable = srvKeepPortable;
+ _keepBinary = keepBinary;
+ _srvKeepBinary = srvKeepBinary;
_asyncInstance = new Lazy<Services>(() => new Services(this));
}
@@ -90,26 +90,26 @@ namespace Apache.Ignite.Core.Impl.Services
private Services(Services services) : base(UU.ServicesWithAsync(services.Target), services.Marshaller)
{
_clusterGroup = services.ClusterGroup;
- _keepPortable = services._keepPortable;
- _srvKeepPortable = services._srvKeepPortable;
+ _keepBinary = services._keepBinary;
+ _srvKeepBinary = services._srvKeepBinary;
}
/** <inheritDoc /> */
- public IServices WithKeepPortable()
+ public IServices WithKeepBinary()
{
- if (_keepPortable)
+ if (_keepBinary)
return this;
- return new Services(Target, Marshaller, _clusterGroup, true, _srvKeepPortable);
+ return new Services(Target, Marshaller, _clusterGroup, true, _srvKeepBinary);
}
/** <inheritDoc /> */
- public IServices WithServerKeepPortable()
+ public IServices WithServerKeepBinary()
{
- if (_srvKeepPortable)
+ if (_srvKeepBinary)
return this;
- return new Services(UU.ServicesWithServerKeepPortable(Target), Marshaller, _clusterGroup, _keepPortable, true);
+ return new Services(UU.ServicesWithServerKeepBinary(Target), Marshaller, _clusterGroup, _keepBinary, true);
}
/** <inheritDoc /> */
@@ -273,7 +273,7 @@ namespace Apache.Ignite.Core.Impl.Services
{
return DoInOp(OpDescriptors, stream =>
{
- var reader = Marshaller.StartUnmarshal(stream, _keepPortable);
+ var reader = Marshaller.StartUnmarshal(stream, _keepBinary);
var size = reader.ReadInt();
@@ -366,7 +366,7 @@ namespace Apache.Ignite.Core.Impl.Services
{
return DoOutInOp(OpInvokeMethod,
writer => ServiceProxySerializer.WriteProxyMethod(writer, method, args),
- stream => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, _keepPortable), proxy.Target);
+ stream => ServiceProxySerializer.ReadInvocationResult(stream, Marshaller, _keepBinary), proxy.Target);
}
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionMetricsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionMetricsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionMetricsImpl.cs
index 8afc36b..524bc6b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionMetricsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionMetricsImpl.cs
@@ -19,7 +19,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
{
using System;
using System.Diagnostics;
- using Apache.Ignite.Core.Portable;
+ using Apache.Ignite.Core.Binary;
using Apache.Ignite.Core.Transactions;
/// <summary>
@@ -31,7 +31,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
/// Initializes a new instance of the <see cref="TransactionMetricsImpl"/> class.
/// </summary>
/// <param name="reader">The reader.</param>
- public TransactionMetricsImpl(IPortableRawReader reader)
+ public TransactionMetricsImpl(IBinaryRawReader reader)
{
var commitTime = reader.ReadTimestamp();
Debug.Assert(commitTime.HasValue);
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
index 3305ba1..a27bffe 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Transactions/TransactionsImpl.cs
@@ -19,9 +19,9 @@ namespace Apache.Ignite.Core.Impl.Transactions
{
using System;
using System.Threading.Tasks;
- using Apache.Ignite.Core.Impl.Portable;
+ using Apache.Ignite.Core.Binary;
+ using Apache.Ignite.Core.Impl.Binary;
using Apache.Ignite.Core.Impl.Unmanaged;
- using Apache.Ignite.Core.Portable;
using Apache.Ignite.Core.Transactions;
using UU = Apache.Ignite.Core.Impl.Unmanaged.UnmanagedUtils;
@@ -54,7 +54,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
/// <param name="target">Target.</param>
/// <param name="marsh">Marshaller.</param>
/// <param name="localNodeId">Local node id.</param>
- public TransactionsImpl(IUnmanagedTarget target, PortableMarshaller marsh,
+ public TransactionsImpl(IUnmanagedTarget target, Marshaller marsh,
Guid localNodeId) : base(target, marsh)
{
_localNodeId = localNodeId;
@@ -112,7 +112,7 @@ namespace Apache.Ignite.Core.Impl.Transactions
{
return DoInOp(OpMetrics, stream =>
{
- IPortableRawReader reader = Marshaller.StartUnmarshal(stream, false);
+ IBinaryRawReader reader = Marshaller.StartUnmarshal(stream, false);
return new TransactionMetricsImpl(reader);
});
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
index 54cfe28..12abefb 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedCallbacks.cs
@@ -26,6 +26,8 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
using Apache.Ignite.Core.Cluster;
using Apache.Ignite.Core.Common;
+ using Apache.Ignite.Core.Impl.Binary;
+ using Apache.Ignite.Core.Impl.Binary.IO;
using Apache.Ignite.Core.Impl.Cache;
using Apache.Ignite.Core.Impl.Cache.Query.Continuous;
using Apache.Ignite.Core.Impl.Cache.Store;
@@ -36,8 +38,6 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
using Apache.Ignite.Core.Impl.Handle;
using Apache.Ignite.Core.Impl.Memory;
using Apache.Ignite.Core.Impl.Messaging;
- using Apache.Ignite.Core.Impl.Portable;
- using Apache.Ignite.Core.Impl.Portable.IO;
using Apache.Ignite.Core.Impl.Resource;
using Apache.Ignite.Core.Impl.Services;
using Apache.Ignite.Core.Lifecycle;
@@ -358,7 +358,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
/// <param name="inOutStream">Stream.</param>
/// <param name="grid">Grid.</param>
/// <returns>CacheEntryProcessor result.</returns>
- private CacheEntryProcessorResultHolder ReadAndRunCacheEntryProcessor(IPortableStream inOutStream,
+ private CacheEntryProcessorResultHolder ReadAndRunCacheEntryProcessor(IBinaryStream inOutStream,
Ignite grid)
{
var marsh = grid.Marshaller;
@@ -547,7 +547,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
// 2. Create real filter from it's holder.
var filter = (IContinuousQueryFilter) DelegateTypeDescriptor.GetContinuousQueryFilterCtor(
- filterHolder.Filter.GetType())(filterHolder.Filter, filterHolder.KeepPortable);
+ filterHolder.Filter.GetType())(filterHolder.Filter, filterHolder.KeepBinary);
// 3. Inject grid.
filter.Inject(_ignite);
@@ -610,9 +610,9 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
{
using (var stream = IgniteManager.Memory.Get(memPtr).GetStream())
{
- var reader = _ignite.Marshaller.StartUnmarshal(stream, PortableMode.ForcePortable);
+ var reader = _ignite.Marshaller.StartUnmarshal(stream, BinaryMode.ForceBinary);
- var portableReceiver = reader.ReadObject<PortableUserObject>();
+ var portableReceiver = reader.ReadObject<BinaryObject>();
var receiver = _handleRegistry.Get<StreamReceiverHolder>(rcvPtr) ??
portableReceiver.Deserialize<StreamReceiverHolder>();
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
index 7a19ac4..9a49fae 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Unmanaged/UnmanagedUtils.cs
@@ -71,7 +71,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private const string ProcCacheWithNoRetries = "IgniteCacheWithNoRetries";
private const string ProcCacheWithExpiryPolicy = "IgniteCacheWithExpiryPolicy";
private const string ProcCacheWithAsync = "IgniteCacheWithAsync";
- private const string ProcCacheWithKeepPortable = "IgniteCacheWithKeepPortable";
+ private const string ProcCacheWithKeepBinary = "IgniteCacheWithKeepPortable";
private const string ProcCacheClear = "IgniteCacheClear";
private const string ProcCacheRemoveAll = "IgniteCacheRemoveAll";
private const string ProcCacheOutOpQueryCursor = "IgniteCacheOutOpQueryCursor";
@@ -147,7 +147,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private const string ProcDeleteContext = "IgniteDeleteContext";
private const string ProcServicesWithAsync = "IgniteServicesWithAsync";
- private const string ProcServicesWithServerKeepPortable = "IgniteServicesWithServerKeepPortable";
+ private const string ProcServicesWithServerKeepBinary = "IgniteServicesWithServerKeepPortable";
private const string ProcServicesCancel = "IgniteServicesCancel";
private const string ProcServicesCancelAll = "IgniteServicesCancelAll";
private const string ProcServicesGetServiceProxy = "IgniteServicesGetServiceProxy";
@@ -177,7 +177,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private delegate void* ProcessorCreateCacheDelegate(void* ctx, void* obj, sbyte* name);
private delegate void* ProcessorGetOrCreateCacheDelegate(void* ctx, void* obj, sbyte* name);
private delegate void* ProcessorAffinityDelegate(void* ctx, void* obj, sbyte* name);
- private delegate void* ProcessorDataStreamerDelegate(void* ctx, void* obj, sbyte* name, bool keepPortable);
+ private delegate void* ProcessorDataStreamerDelegate(void* ctx, void* obj, sbyte* name, bool keepBinary);
private delegate void* ProcessorTransactionsDelegate(void* ctx, void* obj);
private delegate void* ProcessorComputeDelegate(void* ctx, void* obj, void* prj);
private delegate void* ProcessorMessageDelegate(void* ctx, void* obj, void* prj);
@@ -202,7 +202,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private delegate void* CacheNoRetriesDelegate(void* ctx, void* obj);
private delegate void* CacheWithExpiryPolicyDelegate(void* ctx, void* obj, long create, long update, long access);
private delegate void* CacheWithAsyncDelegate(void* ctx, void* obj);
- private delegate void* CacheWithKeepPortableDelegate(void* ctx, void* obj);
+ private delegate void* CacheWithKeepBinaryDelegate(void* ctx, void* obj);
private delegate void CacheClearDelegate(void* ctx, void* obj);
private delegate void CacheRemoveAllDelegate(void* ctx, void* obj);
private delegate void* CacheOutOpQueryCursorDelegate(void* ctx, void* obj, int type, long memPtr);
@@ -278,7 +278,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private delegate void DeleteContextDelegate(void* ptr);
private delegate void* ServicesWithAsyncDelegate(void* ctx, void* target);
- private delegate void* ServicesWithServerKeepPortableDelegate(void* ctx, void* target);
+ private delegate void* ServicesWithServerKeepBinaryDelegate(void* ctx, void* target);
private delegate long ServicesCancelDelegate(void* ctx, void* target, char* name);
private delegate long ServicesCancelAllDelegate(void* ctx, void* target);
private delegate void* ServicesGetServiceProxyDelegate(void* ctx, void* target, char* name, bool sticky);
@@ -334,7 +334,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private static readonly CacheNoRetriesDelegate CACHE_WITH_NO_RETRIES;
private static readonly CacheWithExpiryPolicyDelegate CACHE_WITH_EXPIRY_POLICY;
private static readonly CacheWithAsyncDelegate CACHE_WITH_ASYNC;
- private static readonly CacheWithKeepPortableDelegate CACHE_WITH_KEEP_PORTABLE;
+ private static readonly CacheWithKeepBinaryDelegate CACHE_WITH_KEEP_BINARY;
private static readonly CacheClearDelegate CACHE_CLEAR;
private static readonly CacheRemoveAllDelegate CACHE_REMOVE_ALL;
private static readonly CacheOutOpQueryCursorDelegate CACHE_OUT_OP_QUERY_CURSOR;
@@ -410,7 +410,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
private static readonly DeleteContextDelegate DELETE_CONTEXT;
private static readonly ServicesWithAsyncDelegate SERVICES_WITH_ASYNC;
- private static readonly ServicesWithServerKeepPortableDelegate SERVICES_WITH_SERVER_KEEP_PORTABLE;
+ private static readonly ServicesWithServerKeepBinaryDelegate SERVICES_WITH_SERVER_KEEP_BINARY;
private static readonly ServicesCancelDelegate SERVICES_CANCEL;
private static readonly ServicesCancelAllDelegate SERVICES_CANCEL_ALL;
private static readonly ServicesGetServiceProxyDelegate SERVICES_GET_SERVICE_PROXY;
@@ -482,7 +482,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
CACHE_WITH_NO_RETRIES = CreateDelegate<CacheNoRetriesDelegate>(ProcCacheWithNoRetries);
CACHE_WITH_EXPIRY_POLICY = CreateDelegate<CacheWithExpiryPolicyDelegate>(ProcCacheWithExpiryPolicy);
CACHE_WITH_ASYNC = CreateDelegate<CacheWithAsyncDelegate>(ProcCacheWithAsync);
- CACHE_WITH_KEEP_PORTABLE = CreateDelegate<CacheWithKeepPortableDelegate>(ProcCacheWithKeepPortable);
+ CACHE_WITH_KEEP_BINARY = CreateDelegate<CacheWithKeepBinaryDelegate>(ProcCacheWithKeepBinary);
CACHE_CLEAR = CreateDelegate<CacheClearDelegate>(ProcCacheClear);
CACHE_REMOVE_ALL = CreateDelegate<CacheRemoveAllDelegate>(ProcCacheRemoveAll);
CACHE_OUT_OP_QUERY_CURSOR = CreateDelegate<CacheOutOpQueryCursorDelegate>(ProcCacheOutOpQueryCursor);
@@ -557,7 +557,7 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
EVENTS_IS_ENABLED = CreateDelegate<EventsIsEnabledDelegate>(ProcEventsIsEnabled);
SERVICES_WITH_ASYNC = CreateDelegate<ServicesWithAsyncDelegate>(ProcServicesWithAsync);
- SERVICES_WITH_SERVER_KEEP_PORTABLE = CreateDelegate<ServicesWithServerKeepPortableDelegate>(ProcServicesWithServerKeepPortable);
+ SERVICES_WITH_SERVER_KEEP_BINARY = CreateDelegate<ServicesWithServerKeepBinaryDelegate>(ProcServicesWithServerKeepBinary);
SERVICES_CANCEL = CreateDelegate<ServicesCancelDelegate>(ProcServicesCancel);
SERVICES_CANCEL_ALL = CreateDelegate<ServicesCancelAllDelegate>(ProcServicesCancelAll);
SERVICES_GET_SERVICE_PROXY = CreateDelegate<ServicesGetServiceProxyDelegate>(ProcServicesGetServiceProxy);
@@ -694,13 +694,13 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
}
}
- internal static IUnmanagedTarget ProcessorDataStreamer(IUnmanagedTarget target, string name, bool keepPortable)
+ internal static IUnmanagedTarget ProcessorDataStreamer(IUnmanagedTarget target, string name, bool keepBinary)
{
sbyte* name0 = IgniteUtils.StringToUtf8Unmanaged(name);
try
{
- void* res = PROCESSOR_DATA_STREAMER(target.Context, target.Target, name0, keepPortable);
+ void* res = PROCESSOR_DATA_STREAMER(target.Context, target.Target, name0, keepBinary);
return target.ChangeTarget(res);
}
@@ -863,9 +863,9 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
return target.ChangeTarget(res);
}
- internal static IUnmanagedTarget CacheWithKeepPortable(IUnmanagedTarget target)
+ internal static IUnmanagedTarget CacheWithKeepBinary(IUnmanagedTarget target)
{
- void* res = CACHE_WITH_KEEP_PORTABLE(target.Context, target.Target);
+ void* res = CACHE_WITH_KEEP_BINARY(target.Context, target.Target);
return target.ChangeTarget(res);
}
@@ -1253,9 +1253,9 @@ namespace Apache.Ignite.Core.Impl.Unmanaged
return target.ChangeTarget(SERVICES_WITH_ASYNC(target.Context, target.Target));
}
- internal static IUnmanagedTarget ServicesWithServerKeepPortable(IUnmanagedTarget target)
+ internal static IUnmanagedTarget ServicesWithServerKeepBinary(IUnmanagedTarget target)
{
- return target.ChangeTarget(SERVICES_WITH_SERVER_KEEP_PORTABLE(target.Context, target.Target));
+ return target.ChangeTarget(SERVICES_WITH_SERVER_KEEP_BINARY(target.Context, target.Target));
}
internal static void ServicesCancel(IUnmanagedTarget target, string name)
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
deleted file mode 100644
index ad92223..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableBuilder.cs
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- using System;
- using System.Collections;
-
- /// <summary>
- /// Portable object builder. Provides ability to build portable objects dynamically
- /// without having class definitions.
- /// <para />
- /// Note that type ID is required in order to build portable object. Usually it is
- /// enough to provide a simple type name and Ignite will generate the type ID
- /// automatically.
- /// </summary>
- public interface IPortableBuilder
- {
- /// <summary>
- /// Get object field value. If value is another portable object, then
- /// builder for this object will be returned. If value is a container
- /// for other objects (array, ICollection, IDictionary), then container
- /// will be returned with primitive types in deserialized form and
- /// portable objects as builders. Any change in builder or collection
- /// returned through this method will be reflected in the resulting
- /// portable object after build.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Field value.</returns>
- T GetField<T>(string fieldName);
-
- /// <summary>
- /// Set object field value. Value can be of any type including other
- /// <see cref="IPortableObject"/> and other builders.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <param name="val">Field value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetField<T>(string fieldName, T val);
-
- /// <summary>
- /// Remove object field.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder RemoveField(string fieldName);
-
- /// <summary>
- /// Set explicit hash code. If builder creating object from scratch,
- /// then hash code initially set to 0. If builder is created from
- /// exising portable object, then hash code of that object is used
- /// as initial value.
- /// </summary>
- /// <param name="hashCode">Hash code.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetHashCode(int hashCode);
-
- /// <summary>
- /// Build the object.
- /// </summary>
- /// <returns>Resulting portable object.</returns>
- IPortableObject Build();
-
- /// <summary>
- /// Sets the array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetArrayField<T>(string fieldName, T[] val);
-
- /// <summary>
- /// Sets the boolean field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetBooleanField(string fieldName, bool val);
-
- /// <summary>
- /// Sets the boolean array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetBooleanArrayField(string fieldName, bool[] val);
-
- /// <summary>
- /// Sets the byte field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetByteField(string fieldName, byte val);
-
- /// <summary>
- /// Sets the byte array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetByteArrayField(string fieldName, byte[] val);
-
- /// <summary>
- /// Sets the char field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetCharField(string fieldName, char val);
-
- /// <summary>
- /// Sets the char array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetCharArrayField(string fieldName, char[] val);
-
- /// <summary>
- /// Sets the collection field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetCollectionField(string fieldName, ICollection val);
-
- /// <summary>
- /// Sets the decimal field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetDecimalField(string fieldName, decimal? val);
-
- /// <summary>
- /// Sets the decimal array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetDecimalArrayField(string fieldName, decimal?[] val);
-
- /// <summary>
- /// Sets the dictionary field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetDictionaryField(string fieldName, IDictionary val);
-
- /// <summary>
- /// Sets the double field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetDoubleField(string fieldName, double val);
-
- /// <summary>
- /// Sets the double array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetDoubleArrayField(string fieldName, double[] val);
-
- /// <summary>
- /// Sets the enum field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetEnumField<T>(string fieldName, T val);
-
- /// <summary>
- /// Sets the enum array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetEnumArrayField<T>(string fieldName, T[] val);
-
- /// <summary>
- /// Sets the float field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetFloatField(string fieldName, float val);
-
- /// <summary>
- /// Sets the float array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetFloatArrayField(string fieldName, float[] val);
-
- /// <summary>
- /// Sets the guid field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetGuidField(string fieldName, Guid? val);
-
- /// <summary>
- /// Sets the guid array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetGuidArrayField(string fieldName, Guid?[] val);
-
- /// <summary>
- /// Sets the int field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetIntField(string fieldName, int val);
-
- /// <summary>
- /// Sets the int array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetIntArrayField(string fieldName, int[] val);
-
- /// <summary>
- /// Sets the long field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetLongField(string fieldName, long val);
-
- /// <summary>
- /// Sets the long array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetLongArrayField(string fieldName, long[] val);
-
- /// <summary>
- /// Sets the short field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetShortField(string fieldName, short val);
-
- /// <summary>
- /// Sets the short array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetShortArrayField(string fieldName, short[] val);
-
- /// <summary>
- /// Sets the string field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetStringField(string fieldName, string val);
-
- /// <summary>
- /// Sets the string array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetStringArrayField(string fieldName, string[] val);
-
- /// <summary>
- /// Sets the timestamp field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetTimestampField(string fieldName, DateTime? val);
-
- /// <summary>
- /// Sets the timestamp array field.
- /// </summary>
- /// <param name="fieldName">Name of the field.</param>
- /// <param name="val">The value.</param>
- /// <returns>Current builder instance.</returns>
- IPortableBuilder SetTimestampArrayField(string fieldName, DateTime?[] val);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
deleted file mode 100644
index 0c18eb9..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableIdMapper.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- /// <summary>
- /// Maps class name and class field names to integer identifiers.
- /// </summary>
- public interface IPortableIdMapper
- {
- /// <summary>
- /// Gets type ID for the given type.
- /// </summary>
- /// <param name="typeName">Full type name.</param>
- /// <returns>ID of the class or 0 in case hash code is to be used.</returns>
- int GetTypeId(string typeName);
-
- /// <summary>
- /// Gets field ID for the given field of the given class.
- /// </summary>
- /// <param name="typeId">Type ID.</param>
- /// <param name="fieldName">Field name.</param>
- /// <returns>ID of the field or null in case hash code is to be used.</returns>
- int GetFieldId(int typeId, string fieldName);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMarshalAware.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMarshalAware.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMarshalAware.cs
deleted file mode 100644
index 2795db4..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMarshalAware.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- /// <summary>
- /// Interface to implement custom portable serialization logic.
- /// </summary>
- public interface IPortableMarshalAware
- {
- /// <summary>
- /// Writes this object to the given writer.
- /// </summary>
- /// <param name="writer">Writer.</param>
- /// <exception cref="System.IO.IOException">If write failed.</exception>
- void WritePortable(IPortableWriter writer);
-
- /// <summary>
- /// Reads this object from the given reader.
- /// </summary>
- /// <param name="reader">Reader.</param>
- /// <exception cref="System.IO.IOException">If read failed.</exception>
- void ReadPortable(IPortableReader reader);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
deleted file mode 100644
index 5bfa340..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableMetadata.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- using System.Collections.Generic;
-
- /// <summary>
- /// Portable type metadata.
- /// </summary>
- public interface IPortableMetadata
- {
- /// <summary>
- /// Gets type name.
- /// </summary>
- /// <returns>Type name.</returns>
- string TypeName { get; }
-
- /// <summary>
- /// Gets field names for that type.
- /// </summary>
- /// <returns>Field names.</returns>
- ICollection<string> Fields { get; }
-
- /// <summary>
- /// Gets field type for the given field name.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Field type.</returns>
- string GetFieldTypeName(string fieldName);
-
- /// <summary>
- /// Gets optional affinity key field name.
- /// </summary>
- /// <returns>Affinity key field name or null in case it is not provided.</returns>
- string AffinityKeyFieldName { get; }
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
deleted file mode 100644
index 96a9d38..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableNameMapper.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- /// <summary>
- /// Maps type and field names to different names.
- /// </summary>
- public interface IPortableNameMapper
- {
- /// <summary>
- /// Gets the type name.
- /// </summary>
- /// <param name="name">The name.</param>
- /// <returns>Type name.</returns>
- string GetTypeName(string name);
-
- /// <summary>
- /// Gets the field name.
- /// </summary>
- /// <param name="name">The name.</param>
- /// <returns>Field name.</returns>
- string GetFieldName(string name);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
deleted file mode 100644
index 9855d84..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableObject.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- using System.Diagnostics.CodeAnalysis;
-
- /// <summary>
- /// Wrapper for serialized portable objects.
- /// </summary>
- public interface IPortableObject
- {
- /// <summary>
- /// Gets portable object type ID.
- /// </summary>
- /// <value>
- /// Type ID.
- /// </value>
- int TypeId { get; }
-
- /// <summary>
- /// Gets object metadata.
- /// </summary>
- /// <returns>Metadata.</returns>
- [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
- Justification = "Expensive operation.")]
- IPortableMetadata GetMetadata();
-
- /// <summary>
- /// Gets field value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>
- /// Field value.
- /// </returns>
- TF GetField<TF>(string fieldName);
-
- /// <summary>
- /// Gets fully deserialized instance of portable object.
- /// </summary>
- /// <returns>
- /// Fully deserialized instance of portable object.
- /// </returns>
- T Deserialize<T>();
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
deleted file mode 100644
index 1c30aad..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawReader.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- using System;
- using System.Collections;
-
- /// <summary>
- /// Raw reader for portable objects.
- /// </summary>
- public interface IPortableRawReader
- {
- /// <summary>
- /// Read byte value.
- /// </summary>
- /// <returns>Byte value.</returns>
- byte ReadByte();
-
- /// <summary>
- /// Read byte array.
- /// </summary>
- /// <returns>Byte array.</returns>
- byte[] ReadByteArray();
-
- /// <summary>
- /// Read char value.
- /// </summary>
- /// <returns>Char value.</returns>
- char ReadChar();
-
- /// <summary>
- /// Read char array.
- /// </summary>
- /// <returns>Char array.</returns>
- char[] ReadCharArray();
-
- /// <summary>
- /// Read short value.
- /// </summary>
- /// <returns>Short value.</returns>
- short ReadShort();
-
- /// <summary>
- /// Read short array.
- /// </summary>
- /// <returns>Short array.</returns>
- short[] ReadShortArray();
-
- /// <summary>
- /// Read int value.
- /// </summary>
- /// <returns>Int value.</returns>
- int ReadInt();
-
- /// <summary>
- /// Read int array.
- /// </summary>
- /// <returns>Int array.</returns>
- int[] ReadIntArray();
-
- /// <summary>
- /// Read long value.
- /// </summary>
- /// <returns>Long value.</returns>
- long ReadLong();
-
- /// <summary>
- /// Read long array.
- /// </summary>
- /// <returns>Long array.</returns>
- long[] ReadLongArray();
-
- /// <summary>
- /// Read boolean value.
- /// </summary>
- /// <returns>Boolean value.</returns>
- bool ReadBoolean();
-
- /// <summary>
- /// Read boolean array.
- /// </summary>
- /// <returns>Boolean array.</returns>
- bool[] ReadBooleanArray();
-
- /// <summary>
- /// Read float value.
- /// </summary>
- /// <returns>Float value.</returns>
- float ReadFloat();
-
- /// <summary>
- /// Read float array.
- /// </summary>
- /// <returns>Float array.</returns>
- float[] ReadFloatArray();
-
- /// <summary>
- /// Read double value.
- /// </summary>
- /// <returns>Double value.</returns>
- double ReadDouble();
-
- /// <summary>
- /// Read double array.
- /// </summary>
- /// <returns>Double array.</returns>
- double[] ReadDoubleArray();
-
- /// <summary>
- /// Read decimal value.
- /// </summary>
- /// <returns>Decimal value.</returns>
- decimal? ReadDecimal();
-
- /// <summary>
- /// Read decimal array.
- /// </summary>
- /// <returns>Decimal array.</returns>
- decimal?[] ReadDecimalArray();
-
- /// <summary>
- /// Read date value in UTC form. Shortcut for <c>ReadTimestamp(false)</c>.
- /// </summary>
- /// <returns>Date value.</returns>
- DateTime? ReadTimestamp();
-
- /// <summary>
- /// Read date array in UTC form. Shortcut for <c>ReadTimestampArray(false)</c>.
- /// </summary>
- /// <returns>Date array.</returns>
- DateTime?[] ReadTimestampArray();
-
- /// <summary>
- /// Read string value.
- /// </summary>
- /// <returns>String value.</returns>
- string ReadString();
-
- /// <summary>
- /// Read string array.
- /// </summary>
- /// <returns>String array.</returns>
- string[] ReadStringArray();
-
- /// <summary>
- /// Read GUID value.
- /// </summary>
- /// <returns>GUID value.</returns>
- Guid? ReadGuid();
-
- /// <summary>
- /// Read GUID array.
- /// </summary>
- /// <returns>GUID array.</returns>
- Guid?[] ReadGuidArray();
-
- /// <summary>
- /// Read enum value.
- /// </summary>
- /// <returns>Enum value.</returns>
- T ReadEnum<T>();
-
- /// <summary>
- /// Read enum array.
- /// </summary>
- /// <returns>Enum array.</returns>
- T[] ReadEnumArray<T>();
-
- /// <summary>
- /// Read object.
- /// </summary>
- /// <returns>Object.</returns>
- T ReadObject<T>();
-
- /// <summary>
- /// Read object array.
- /// </summary>
- /// <returns>Object array.</returns>
- T[] ReadArray<T>();
-
- /// <summary>
- /// Read collection.
- /// </summary>
- /// <returns>Collection.</returns>
- ICollection ReadCollection();
-
- /// <summary>
- /// Read collection.
- /// </summary>
- /// <param name="factory">Factory.</param>
- /// <param name="adder">Adder.</param>
- /// <returns>Collection.</returns>
- ICollection ReadCollection(PortableCollectionFactory factory, PortableCollectionAdder adder);
-
- /// <summary>
- /// Read dictionary.
- /// </summary>
- /// <returns>Dictionary.</returns>
- IDictionary ReadDictionary();
-
- /// <summary>
- /// Read dictionary.
- /// </summary>
- /// <param name="factory">Factory.</param>
- /// <returns>Dictionary.</returns>
- IDictionary ReadDictionary(PortableDictionaryFactory factory);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawWriter.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawWriter.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawWriter.cs
deleted file mode 100644
index fcd449c..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableRawWriter.cs
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- using System;
- using System.Collections;
-
- /// <summary>
- /// Raw writer for portable objects.
- /// </summary>
- public interface IPortableRawWriter
- {
- /// <summary>
- /// Write byte value.
- /// </summary>
- /// <param name="val">Byte value.</param>
- void WriteByte(byte val);
-
- /// <summary>
- /// Write byte array.
- /// </summary>
- /// <param name="val">Byte array.</param>
- void WriteByteArray(byte[] val);
-
- /// <summary>
- /// Write char value.
- /// </summary>
- /// <param name="val">Char value.</param>
- void WriteChar(char val);
-
- /// <summary>
- /// Write char array.
- /// </summary>
- /// <param name="val">Char array.</param>
- void WriteCharArray(char[] val);
-
- /// <summary>
- /// Write short value.
- /// </summary>
- /// <param name="val">Short value.</param>
- void WriteShort(short val);
-
- /// <summary>
- /// Write short array.
- /// </summary>
- /// <param name="val">Short array.</param>
- void WriteShortArray(short[] val);
-
- /// <summary>
- /// Write int value.
- /// </summary>
- /// <param name="val">Int value.</param>
- void WriteInt(int val);
-
- /// <summary>
- /// Write int array.
- /// </summary>
- /// <param name="val">Int array.</param>
- void WriteIntArray(int[] val);
-
- /// <summary>
- /// Write long value.
- /// </summary>
- /// <param name="val">Long value.</param>
- void WriteLong(long val);
-
- /// <summary>
- /// Write long array.
- /// </summary>
- /// <param name="val">Long array.</param>
- void WriteLongArray(long[] val);
-
- /// <summary>
- /// Write boolean value.
- /// </summary>
- /// <param name="val">Boolean value.</param>
- void WriteBoolean(bool val);
-
- /// <summary>
- /// Write boolean array.
- /// </summary>
- /// <param name="val">Boolean array.</param>
- void WriteBooleanArray(bool[] val);
-
- /// <summary>
- /// Write float value.
- /// </summary>
- /// <param name="val">Float value.</param>
- void WriteFloat(float val);
-
- /// <summary>
- /// Write float array.
- /// </summary>
- /// <param name="val">Float array.</param>
- void WriteFloatArray(float[] val);
-
- /// <summary>
- /// Write double value.
- /// </summary>
- /// <param name="val">Double value.</param>
- void WriteDouble(double val);
-
- /// <summary>
- /// Write double array.
- /// </summary>
- /// <param name="val">Double array.</param>
- void WriteDoubleArray(double[] val);
-
- /// <summary>
- /// Write decimal value.
- /// </summary>
- /// <param name="val">Decimal value.</param>
- void WriteDecimal(decimal? val);
-
- /// <summary>
- /// Write decimal array.
- /// </summary>
- /// <param name="val">Decimal array.</param>
- void WriteDecimalArray(decimal?[] val);
-
- /// <summary>
- /// Write date value.
- /// </summary>
- /// <param name="val">Date value.</param>
- void WriteTimestamp(DateTime? val);
-
- /// <summary>
- /// Write date array.
- /// </summary>
- /// <param name="val">Date array.</param>
- void WriteTimestampArray(DateTime?[] val);
-
- /// <summary>
- /// Write string value.
- /// </summary>
- /// <param name="val">String value.</param>
- void WriteString(string val);
-
- /// <summary>
- /// Write string array.
- /// </summary>
- /// <param name="val">String array.</param>
- void WriteStringArray(string[] val);
-
- /// <summary>
- /// Write GUID value.
- /// </summary>
- /// <param name="val">GUID value.</param>
- void WriteGuid(Guid? val);
-
- /// <summary>
- /// Write GUID array.
- /// </summary>
- /// <param name="val">GUID array.</param>
- void WriteGuidArray(Guid?[] val);
-
- /// <summary>
- /// Write enum value.
- /// </summary>
- /// <param name="val">Enum value.</param>
- void WriteEnum<T>(T val);
-
- /// <summary>
- /// Write enum array.
- /// </summary>
- /// <param name="val">Enum array.</param>
- void WriteEnumArray<T>(T[] val);
-
- /// <summary>
- /// Write object value.
- /// </summary>
- /// <param name="val">Object value.</param>
- void WriteObject<T>(T val);
-
- /// <summary>
- /// Write object array.
- /// </summary>
- /// <param name="val">Object array.</param>
- void WriteArray<T>(T[] val);
-
- /// <summary>
- /// Writes a collection in interoperable form.
- ///
- /// Use this method to communicate with other platforms
- /// or with nodes that need to read collection elements in portable form.
- ///
- /// When there is no need for portables or interoperability, please use <see cref="WriteObject{T}" />,
- /// which will properly preserve generic collection type.
- /// </summary>
- /// <param name="val">Collection.</param>
- void WriteCollection(ICollection val);
-
- /// <summary>
- /// Writes a dictionary in interoperable form.
- ///
- /// Use this method to communicate with other platforms
- /// or with nodes that need to read dictionary elements in portable form.
- ///
- /// When there is no need for portables or interoperability, please use <see cref="WriteObject{T}" />,
- /// which will properly preserve generic dictionary type.
- /// </summary>
- /// <param name="val">Dictionary.</param>
- void WriteDictionary(IDictionary val);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/894057e5/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
deleted file mode 100644
index 7797ba2..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Portable/IPortableReader.cs
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-namespace Apache.Ignite.Core.Portable
-{
- using System;
- using System.Collections;
-
- /// <summary>
- /// Delegate for collection creation.
- /// </summary>
- /// <param name="size">Collection size.</param>
- /// <returns>Collection.</returns>
- public delegate ICollection PortableCollectionFactory(int size);
-
- /// <summary>
- /// Delegate for adding element to collection.
- /// </summary>
- /// <param name="col">Collection.</param>
- /// <param name="elem">Element to add.</param>
- public delegate void PortableCollectionAdder(ICollection col, object elem);
-
- /// <summary>
- /// Delegate for dictionary creation.
- /// </summary>
- /// <param name="size">Dictionary size.</param>
- /// <returns>Dictionary.</returns>
- public delegate IDictionary PortableDictionaryFactory(int size);
-
- /// <summary>
- /// Reader for portable objects.
- /// </summary>
- public interface IPortableReader
- {
- /// <summary>
- /// Read named byte value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Byte value.</returns>
- byte ReadByte(string fieldName);
-
- /// <summary>
- /// Read named byte array.
- /// </summary>
- /// <returns>Byte array.</returns>
- byte[] ReadByteArray(string fieldName);
-
- /// <summary>
- /// Read named char value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Char value.</returns>
- char ReadChar(string fieldName);
-
- /// <summary>
- /// Read named char array.
- /// </summary>
- /// <returns>Char array.</returns>
- char[] ReadCharArray(string fieldName);
-
- /// <summary>
- /// Read named short value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Short value.</returns>
- short ReadShort(string fieldName);
-
- /// <summary>
- /// Read named short array.
- /// </summary>
- /// <returns>Short array.</returns>
- short[] ReadShortArray(string fieldName);
-
- /// <summary>
- /// Read named int value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Int value.</returns>
- int ReadInt(string fieldName);
-
- /// <summary>
- /// Read named int array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Int array.</returns>
- int[] ReadIntArray(string fieldName);
-
- /// <summary>
- /// Read named long value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Long value.</returns>
- long ReadLong(string fieldName);
-
- /// <summary>
- /// Read named long array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Long array.</returns>
- long[] ReadLongArray(string fieldName);
-
- /// <summary>
- /// Read named boolean value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Boolean value.</returns>
- bool ReadBoolean(string fieldName);
-
- /// <summary>
- /// Read named boolean array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Boolean array.</returns>
- bool[] ReadBooleanArray(string fieldName);
-
- /// <summary>
- /// Read named float value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Float value.</returns>
- float ReadFloat(string fieldName);
-
- /// <summary>
- /// Read named float array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Float array.</returns>
- float[] ReadFloatArray(string fieldName);
-
- /// <summary>
- /// Read named double value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Double value.</returns>
- double ReadDouble(string fieldName);
-
- /// <summary>
- /// Read named double array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Double array.</returns>
- double[] ReadDoubleArray(string fieldName);
-
- /// <summary>
- /// Read named decimal value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Decimal value.</returns>
- decimal? ReadDecimal(string fieldName);
-
- /// <summary>
- /// Read named decimal array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Decimal array.</returns>
- decimal?[] ReadDecimalArray(string fieldName);
-
- /// <summary>
- /// Read named date value in UTC form.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Date value.</returns>
- DateTime? ReadTimestamp(string fieldName);
-
- /// <summary>
- /// Read named date array in UTC form.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Date array.</returns>
- DateTime?[] ReadTimestampArray(string fieldName);
-
- /// <summary>
- /// Read named string value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>String value.</returns>
- string ReadString(string fieldName);
-
- /// <summary>
- /// Read named string array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>String array.</returns>
- string[] ReadStringArray(string fieldName);
-
- /// <summary>
- /// Read named GUID value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>GUID value.</returns>
- Guid? ReadGuid(string fieldName);
-
- /// <summary>
- /// Read named GUID array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>GUID array.</returns>
- Guid?[] ReadGuidArray(string fieldName);
-
- /// <summary>
- /// Read named enum value.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Enum value.</returns>
- T ReadEnum<T>(string fieldName);
-
- /// <summary>
- /// Read named enum array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Enum array.</returns>
- T[] ReadEnumArray<T>(string fieldName);
-
- /// <summary>
- /// Read named object.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Object.</returns>
- T ReadObject<T>(string fieldName);
-
- /// <summary>
- /// Read named object array.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Object array.</returns>
- T[] ReadArray<T>(string fieldName);
-
- /// <summary>
- /// Read named collection.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Collection.</returns>
- ICollection ReadCollection(string fieldName);
-
- /// <summary>
- /// Read named collection.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <param name="factory">Factory.</param>
- /// <param name="adder">Adder.</param>
- /// <returns>Collection.</returns>
- ICollection ReadCollection(string fieldName, PortableCollectionFactory factory, PortableCollectionAdder adder);
-
- /// <summary>
- /// Read named dictionary.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <returns>Dictionary.</returns>
- IDictionary ReadDictionary(string fieldName);
-
- /// <summary>
- /// Read named dictionary.
- /// </summary>
- /// <param name="fieldName">Field name.</param>
- /// <param name="factory">Factory.</param>
- /// <returns>Dictionary.</returns>
- IDictionary ReadDictionary(string fieldName, PortableDictionaryFactory factory);
-
- /// <summary>
- /// Get raw reader.
- /// </summary>
- /// <returns>Raw reader.</returns>
- IPortableRawReader GetRawReader();
- }
-}
\ No newline at end of file