예제 #1
0
 protected void SetSerializableContentFromFlags()
 {
     SerializableContent    = "";
     NonSerializableContent = "";
     foreach (object value in Enum.GetValues(typeof(SerializationContents)))
     {
         if (!(value is SerializationContents))
         {
             continue;
         }
         SerializationContents serializationContents = (SerializationContents)value;
         if ((Content & serializationContents) == serializationContents && serializationContents != SerializationContents.All && Content != SerializationContents.All)
         {
             if (NonSerializableContent.Length != 0)
             {
                 NonSerializableContent += ", ";
             }
             NonSerializableContent += GetFlagContentString(serializationContents, serializable: false);
             NonSerializableContent  = NonSerializableContent.TrimStart(',');
             if (SerializableContent.Length != 0)
             {
                 SerializableContent += ", ";
             }
             SerializableContent += GetFlagContentString(serializationContents, serializable: true);
             SerializableContent  = SerializableContent.TrimStart(',');
         }
     }
 }
예제 #2
0
 protected void SetSerializableConentFromFlags()
 {
     SerializableContent    = "";
     NonSerializableContent = "";
     foreach (object value in Enum.GetValues(typeof(SerializationContent)))
     {
         if (!(value is SerializationContent))
         {
             continue;
         }
         SerializationContent serializationContent = (SerializationContent)value;
         if ((Content & serializationContent) == serializationContent && serializationContent != SerializationContent.All && Content != SerializationContent.All)
         {
             if (!string.IsNullOrEmpty(NonSerializableContent))
             {
                 NonSerializableContent += ", ";
             }
             NonSerializableContent += GetFlagContentString(serializationContent, serializable: false);
             NonSerializableContent  = NonSerializableContent.TrimStart(',');
             if (!string.IsNullOrEmpty(SerializableContent))
             {
                 SerializableContent += ", ";
             }
             SerializableContent += GetFlagContentString(serializationContent, serializable: true);
             SerializableContent  = SerializableContent.TrimStart(',');
         }
     }
 }
 void SetContent(SerializableContent content, InspectorContentParameters parameters)
 {
     m_Parameters = parameters;
     m_Content    = content;
     m_Content.InspectionContext.ApplyInspectorStyling = m_Parameters.ApplyInspectorStyling;
     m_Content.InspectionContext.UseDefaultMargins     = m_Parameters.UseDefaultMargins;
     m_Content.Root = Root;
     m_Content.Initialize();
     m_Content.Load();
 }