~ruther/csharp-dll-injector

ref: a5cb4605d7b28142f2ae1ab9d8e0f7091530e7e5 csharp-dll-injector/DllUtils/Attributes/CustomFunctionParamsAttribute.cs -rw-r--r-- 808 bytes
a5cb4605 — František Boháček Add DllUtils 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DllUtils.Attributes
{
    /// <summary>
    /// Use this attribute to specify custom serialization to remote process.
    /// This is needed for example for arrays that should be given by ref.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
    public class CustomFunctionParamsAttribute : Attribute
    {
        public CustomFunctionParamsAttribute(EncodingType stringEncoding = EncodingType.Unicode)
        {
            StringEncoding = stringEncoding;
        }

        public EncodingType StringEncoding { get; set; }
    }

    public enum EncodingType
    {
        ASCII,
        Unicode,
        UTF8,
        UTF32
    }
}
Do not follow this link