当前位置: 首页>>代码示例>>C#>>正文


C# SerializationInfo.GetUInt64方法代码示例

本文整理汇总了C#中System.Runtime.Serialization.SerializationInfo.GetUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetUInt64方法的具体用法?C# SerializationInfo.GetUInt64怎么用?C# SerializationInfo.GetUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Runtime.Serialization.SerializationInfo的用法示例。


在下文中一共展示了SerializationInfo.GetUInt64方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: StarMapFeature

        public StarMapFeature(SerializationInfo info, StreamingContext context)
        {
            //m_Stride = info.GetInt32("m_Stride");
            //m_BytesPerPixel = info.GetInt32("m_BytesPerPixel");
            m_MaxBrightness = info.GetByte("m_MaxBrightness");

            m_MaxBrightnessFirstKey = info.GetUInt64("m_MaxBrightnessFirstKey");
            m_MaxBrightnessPixels = info.GetInt32("m_MaxBrightnessPixels");
            m_Generation = info.GetInt32("m_Generation");
            m_Merges = info.GetInt32("m_Merges");

            m_FeatureId = info.GetInt32("FeatureId");
            m_Intencity = info.GetUInt32("m_Intencity");

            int count = info.GetInt32("m_Pixels.Count");
            int idx = -1;
            m_Pixels = new SortedDictionary<ulong, uint>();
            for (int i = 0; i < count; i++)
            {
                idx++;
                ulong key = info.GetUInt64(string.Format("m_Pixels.{0}.Key", idx));
                uint val = info.GetUInt32(string.Format("m_Pixels.{0}.Value", idx));
                m_Pixels.Add(key, val);
            }
        }
开发者ID:hpavlov,项目名称:tangra3,代码行数:25,代码来源:StarMapFeature.cs

示例2: Credentials

            public Credentials(SerializationInfo info, StreamingContext context)
            {
                int version = 0;

                try
                {
                    version = info.GetInt32("version");
                }

                catch { }

                if (version == 0)
                {
                    Host = info.GetString("m_Host");
                    Port = info.GetInt32("m_Port");
                    WorkspaceID = info.GetUInt64("m_ID");
                    WorkspaceName = info.GetString("m_Name");
                    UserName = info.GetString("m_UserName");
                    UserSmtp = info.GetString("m_UserSmtp");
                    Nonce = (byte[])info.GetValue("m_Nonce", (new byte[] { }).GetType());
                    Type = (Credentials.CredType)Enum.Parse(typeof(CredType), info.GetString("m_type"));
                    Password = info.GetString("m_pwd");
                    Ticket = (byte[])info.GetValue("m_ticket", (new byte[] { }).GetType());
                    IsAdmin = info.GetBoolean("m_IsAdmin");
                    UserID = info.GetUInt32("m_UserId");
                }

                else
                {
                    Host = info.GetString("Host");
                    Port = info.GetInt32("Port");
                    WorkspaceID = info.GetUInt64("ID");
                    WorkspaceName = info.GetString("Name");
                    UserName = info.GetString("UserName");
                    UserSmtp = info.GetString("UserSmtp");
                    Nonce = (byte[])info.GetValue("Nonce", (new byte[] { }).GetType());
                    Type = (Credentials.CredType)Enum.Parse(typeof(CredType), info.GetString("Type"));
                    Password = info.GetString("Password");
                    Ticket = (byte[])info.GetValue("Ticket", (new byte[] { }).GetType());
                    IsAdmin = info.GetBoolean("IsAdmin");
                    UserID = info.GetUInt32("UserID");
                    if (version == 2) IsPublic = info.GetBoolean("IsPublic");
                }

                newCreds.KasID = new KasIdentifier(Host, (UInt16)Port);
                newCreds.ExternalID = WorkspaceID;
                newCreds.KwsName = WorkspaceName;
                newCreds.UserName = UserName;
                newCreds.UserEmailAddress = UserSmtp;
                newCreds.AdminFlag = IsAdmin;
                newCreds.PublicFlag = IsPublic;
                newCreds.UserID = UserID;
                newCreds.Ticket = Ticket;
                newCreds.Pwd = Password;
            }
开发者ID:tmbx,项目名称:kwm,代码行数:55,代码来源:DeprecatedClasses.cs

示例3: CSharpSerializableCompilationOptions

 private CSharpSerializableCompilationOptions(SerializationInfo info, StreamingContext context)
 {
     this.options = new CSharpCompilationOptions(
         outputKind: (OutputKind)info.GetInt32(OutputKindString),
         moduleName: info.GetString(ModuleNameString),
         mainTypeName: info.GetString(MainTypeNameString),
         scriptClassName: info.GetString(ScriptClassNameString),
         usings: (string[])info.GetValue(UsingsString, typeof(string[])),
         cryptoKeyContainer: info.GetString(CryptoKeyContainerString),
         cryptoKeyFile: info.GetString(CryptoKeyFileString),
         delaySign: (bool?)info.GetValue(DelaySignString, typeof(bool?)),
         optimizationLevel: (OptimizationLevel)info.GetInt32(OptimizeString),
         checkOverflow: info.GetBoolean(CheckOverflowString),
         allowUnsafe: info.GetBoolean(AllowUnsafeString),
         fileAlignment: info.GetInt32(FileAlignmentString),
         baseAddress: info.GetUInt64(BaseAddressString),
         platform: (Platform)info.GetInt32(PlatformString),
         generalDiagnosticOption: (ReportDiagnostic)info.GetInt32(GeneralDiagnosticOptionString),
         warningLevel: info.GetInt32(WarningLevelString),
         specificDiagnosticOptions: ((Dictionary<string, ReportDiagnostic>)info.GetValue(SpecificDiagnosticOptionsString, typeof(Dictionary<string, ReportDiagnostic>))).ToImmutableDictionary(),
         highEntropyVirtualAddressSpace: info.GetBoolean(HighEntropyVirtualAddressSpaceString),
         subsystemVersion: SubsystemVersion.Create(info.GetInt32(SubsystemVersionMajorString), info.GetInt32(SubsystemVersionMinorString)),
         runtimeMetadataVersion: info.GetString(RuntimeMetadataVersionString),
         concurrentBuild: info.GetBoolean(ConcurrentBuildString),
         xmlReferenceResolver: XmlFileResolver.Default,
         sourceReferenceResolver: SourceFileResolver.Default,
         metadataReferenceResolver: MetadataFileReferenceResolver.Default,
         metadataReferenceProvider: MetadataFileReferenceProvider.Default,
         assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default,
         strongNameProvider: new DesktopStrongNameProvider(),
         metadataImportOptions: (MetadataImportOptions)info.GetByte(MetadataImportOptionsString),
         features: ((string[])info.GetValue(FeaturesString, typeof(string[]))).AsImmutable());
 }
开发者ID:jerriclynsjohn,项目名称:roslyn,代码行数:33,代码来源:CSharpSerializableCompilationOptions.cs

示例4: struct1

 public struct1(SerializationInfo info, StreamingContext context)
 {
     str1 = info.GetString("str1");
     str2 = info.GetString("str2");
     ulong1 = info.GetUInt64("ulong1");
     ushort1 = info.GetUInt16("ushort1");
     ushort2 = info.GetUInt16("ushort2");
 }
开发者ID:ehershey,项目名称:development,代码行数:8,代码来源:IService1.cs

示例5: Highscore

 public Highscore(SerializationInfo info, StreamingContext ctxt)
 {
     id = info.GetString("ID");
     score = info.GetUInt64("Score");
     drawingAuthor = info.GetString("Author");
     drawingItem = info.GetString("Item");
     scorerName = info.GetString("Scorer");
     scoreTimestamp = (DateTime)info.GetValue("Timestamp", typeof(DateTime));
 }
开发者ID:TheAaltoWindrawTeam,项目名称:AaltoWindraw,代码行数:9,代码来源:Highscore.cs

示例6: UIntPtr

 private unsafe UIntPtr(SerializationInfo info, StreamingContext context)
 {
     ulong num = info.GetUInt64("value");
     if ((Size == 4) && (num > 0xffffffffL))
     {
         throw new ArgumentException(Environment.GetResourceString("Serialization_InvalidPtrValue"));
     }
     this.m_value = (void*) num;
 }
开发者ID:randomize,项目名称:VimConfig,代码行数:9,代码来源:UIntPtr.cs

示例7: UIntPtr

		private UIntPtr(SerializationInfo info, StreamingContext context)
		{
			ulong uInt = info.GetUInt64("value");
			if (UIntPtr.Size == 4 && uInt > (ulong)-1)
			{
				throw new ArgumentException(Environment.GetResourceString("Serialization_InvalidPtrValue"));
			}
			this.m_value = uInt;
		}
开发者ID:ChristianWulf,项目名称:CSharpKDMDiscoverer,代码行数:9,代码来源:UIntPtr.cs

示例8: UIntPtr

        [System.Security.SecurityCritical]  // auto-generated
        private unsafe UIntPtr(SerializationInfo info, StreamingContext context) {
            ulong l = info.GetUInt64("value");

            if (Size==4 && l>UInt32.MaxValue) {
                throw new ArgumentException(Environment.GetResourceString("Serialization_InvalidPtrValue"));
            }

            m_value = (void *)l;
        }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:10,代码来源:uintptr.cs

示例9: JournalEntry

 protected JournalEntry(SerializationInfo info, StreamingContext context)
 {
     Created = info.GetDateTime("Created");
     if (!_unsignedIdsInJournal.HasValue)
     {
         try
         {
             Id = info.GetUInt64("Id");
             _unsignedIdsInJournal = true;
         }
         catch (Exception)
         {
             Id = (ulong) info.GetInt64("Id");
             _unsignedIdsInJournal = false;
         }
     }
     else if (_unsignedIdsInJournal.Value) Id = info.GetUInt64("Id");
     else Id = (ulong) info.GetInt64("Id");
 }
开发者ID:NerdPad,项目名称:OrigoDB,代码行数:19,代码来源:JournalEntry.cs

示例10: DataOperation

        /// <summary>
        /// Construct from a stream of serialized data
        /// </summary>
        /// <param name="info"></param>
        /// <param name="con"></param>
        public DataOperation(SerializationInfo info, StreamingContext con)
        {
            m_ClassId = info.GetUInt32("_ClassId");
            m_ClassName = info.GetString("_ClassName");
            // WARNING:: enum deserialize causes an exception
            // serialization of an enum prints the string
            // representation of the enum value, so we need to
            // deserialize to a string and convert to the relvant
            // enum value.
            // ENUM Deserialization - read as string and convert string to ENUM value
            String s = info.GetString("_OperationType");
            m_OperationType = (OperationType)Enum.Parse(typeof(OperationType), s, true);
            m_InstanceId = info.GetUInt64("_OperationUID");
            m_ExecuteId = info.GetUInt64("_ExecuteUID");

            String dt = info.GetString("_Created");
            DateTime.TryParse(dt, null
                , System.Globalization.DateTimeStyles.AssumeLocal
                , out m_InstanceCreated);
            dt = info.GetString("_Executed");
            DateTime.TryParse(dt, null
                , System.Globalization.DateTimeStyles.AssumeLocal
                , out m_OperationExecuted);
            dt = info.GetString("_Completed");
            DateTime.TryParse(dt, null
                , System.Globalization.DateTimeStyles.AssumeLocal
                , out m_OperationCompleted);
            // deserialization resets the static instance count
            // from the input stream, all previous data is overwritten
            lock (myMutex)
            {
                if (s_InstanceId < m_InstanceId)
                {
                    s_InstanceId = m_InstanceId;
                }
            }
        }
开发者ID:jimbosoft,项目名称:CommonLib,代码行数:42,代码来源:DataOperation.cs

示例11: ServiceModel

 public ServiceModel(SerializationInfo info, StreamingContext context)
 {
     try
     {
         this.Id = info.GetUInt64("Id");
         this.Name = info.GetString("Name");
         this.TypeName = info.GetString("TypeName");
         this.Settings = (Dictionary<string, object>)info.GetValue("Settings", typeof(Dictionary<string, object>));
         this.ManagerCode = info.GetString("ManagerCode");
     }
     catch (SerializationException ex)
     {
         System.Diagnostics.Debug.WriteLine(string.Format("Тип: {0} Ошибка:{1} Сообщение:{2}", this.GetType().Name, ex.GetType().Name, ex.Message));
     }
 }
开发者ID:nomoreserious,项目名称:FlowSimulation,代码行数:15,代码来源:ServiceModel.cs

示例12: CommandFrame

 /// <summary>
 /// Creates a new <see cref="CommandFrame"/> from serialization parameters.
 /// </summary>
 /// <param name="info">The <see cref="SerializationInfo"/> with populated with data.</param>
 /// <param name="context">The source <see cref="StreamingContext"/> for this deserialization.</param>
 protected CommandFrame(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     // Deserialize command frame
     m_idCode = info.GetUInt64("idCode64Bit");
 }
开发者ID:GridProtectionAlliance,项目名称:gsf,代码行数:11,代码来源:CommandFrame.cs

示例13: CompilationOptions

 protected CompilationOptions(SerializationInfo info, StreamingContext context)
 {
     Initialize(
         outputKind: (OutputKind)info.GetInt32(OutputKindString),
         moduleName: info.GetString(ModuleNameString),
         mainTypeName: info.GetString(MainTypeNameString),
         scriptClassName: info.GetString(ScriptClassNameString),
         cryptoKeyContainer: info.GetString(CryptoKeyContainerString),
         cryptoKeyFile: info.GetString(CryptoKeyFileString),
         delaySign: (bool?)info.GetValue(DelaySignString, typeof(bool?)),
         optimize: info.GetBoolean(OptimizeString),
         checkOverflow: info.GetBoolean(CheckOverflowString),
         fileAlignment: info.GetInt32(FileAlignmentString),
         baseAddress: info.GetUInt64(BaseAddressString),
         platform: (Platform)info.GetInt32(PlatformString),
         generalDiagnosticOption: (ReportDiagnostic)info.GetInt32(GeneralDiagnosticOptionString),
         warningLevel: info.GetInt32(WarningLevelString),
         specificDiagnosticOptions: ((Dictionary<string, ReportDiagnostic>)info.GetValue(SpecificDiagnosticOptionsString, typeof(Dictionary<string, ReportDiagnostic>))).ToImmutableDictionary(),
         highEntropyVirtualAddressSpace: info.GetBoolean(HighEntropyVirtualAddressSpaceString),
         debugInformationKind: (DebugInformationKind)info.GetInt32(DebugInformationKindString),
         subsystemVersion: (SubsystemVersion)info.GetValue(SubsystemVersionString, typeof(SubsystemVersion)),
         concurrentBuild: info.GetBoolean(ConcurrentBuildString),
         xmlReferenceResolver: XmlFileResolver.Default,
         sourceReferenceResolver: SourceFileResolver.Default,
         metadataReferenceResolver: MetadataFileReferenceResolver.Default,
         metadataReferenceProvider: MetadataFileReferenceProvider.Default,
         assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default,
         strongNameProvider: new DesktopStrongNameProvider(),
         metadataImportOptions: (MetadataImportOptions)info.GetByte(metadataImportOptionsString));
 }
开发者ID:riversky,项目名称:roslyn,代码行数:30,代码来源:CompilationOptions.cs

示例14: SpookyHash

 private SpookyHash(SerializationInfo info, StreamingContext context)
 {
     _data = (ulong[])info.GetValue("d", typeof(ulong[]));
     _state0 = info.GetUInt64("s0");
     _state1 = info.GetUInt64("s1");
     _state2 = info.GetUInt64("s2");
     _state3 = info.GetUInt64("s3");
     _state4 = info.GetUInt64("s4");
     _state5 = info.GetUInt64("s5");
     _state6 = info.GetUInt64("s6");
     _state7 = info.GetUInt64("s7");
     _state8 = info.GetUInt64("s8");
     _state9 = info.GetUInt64("s9");
     _state10 = info.GetUInt64("s10");
     _state11 = info.GetUInt64("s11");
     _length = info.GetInt32("l");
     _remainder = info.GetInt32("r");
 }
开发者ID:JonHanna,项目名称:SpookilySharp,代码行数:18,代码来源:SpookyHash.cs

示例15: Workspace

        /// <summary>
        /// Deserializing constructor.
        /// </summary>
        public Workspace(SerializationInfo info, StreamingContext context)
        {
            Int32 version = info.GetInt32("WorkspaceVersion");
            InternalID = info.GetUInt64("m_internalID");

            // This is an old workspace which needs to be rebuilt.
            if (version < 5)
            {
                FileKwsDeserializer dsr = (FileKwsDeserializer)KwmSpawner.Instance.KwmDsr.CurKwsDsr;

                // Get the folder information.
                try
                {
                    dsr.FolderID = UInt64.Parse(info.GetString("m_parentFolderID").Substring(6));
                    dsr.FolderIndex = info.GetInt32("m_indexInFolder");
                }

                catch (Exception)
                {
                }

                // Update the credentials.
                CoreData.Credentials = ((Credentials)info.GetValue("credentials", typeof(Credentials))).newCreds;

                // Set the rebuild information.
                MainStatus = KwsMainStatus.RebuildRequired;
                KwsRebuildInfo rebuildInfo = CoreData.RebuildInfo;
                rebuildInfo.DeleteCachedEventsFlag = true;
                rebuildInfo.DeleteLocalDataFlag = false;
                rebuildInfo.UpgradeFlag = true;

                if (version >= 3)
                {
                    AppKfs appKfs = (AppKfs)info.GetValue("m_appKfs", typeof(AppKfs));
                    appKfs.Share.CompatLastKwsEventID = info.GetUInt64("m_lastEventID");
                    appKfs.Initialize(this);
                    AppTree[KAnpType.KANP_NS_KFS] = appKfs;
                }
            }

            // Pre-desintermediation and later.
            else
            {
                MainStatus = (KwsMainStatus)info.GetValue("MainStatus", typeof(KwsMainStatus));
                KAnpState = (KwsKAnpState)info.GetValue("KAnpState", typeof(KwsKAnpState));
                CoreData = (KwsCoreData)info.GetValue("CoreData", typeof(KwsCoreData));
                UserTask = (KwsTask)info.GetValue("UserTask", typeof(KwsTask));

                // Post-desintermediation.
                if (version >= 6)
                {
                    KasLoginHandler = (KwsKasLoginHandler)info.GetValue("KasLoginHandler", typeof(KwsKasLoginHandler));
                    AppException = (Exception)info.GetValue("AppException", typeof(Exception));
                }
            }

            // Create a temporary KAS object.
            Kas = new WmKas(CoreData.Credentials.KasID);
        }
开发者ID:tmbx,项目名称:kwm,代码行数:62,代码来源:Workspace.cs


注:本文中的System.Runtime.Serialization.SerializationInfo.GetUInt64方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。